DEV Community

Cover image for So I built a free online API builder with CORS support 🚀 (and why another Postman alternative)
TechBos😎 for getd.io/ - Postman without native apps

Posted on • Updated on

So I built a free online API builder with CORS support 🚀 (and why another Postman alternative)

TL;DR

Use getd.io/ to test APIs with only your browser - No app or plug-in needed. Supports CORS requests too 🔥!

Here is a screenshot for desktop:

Desktop UI

And here is the updated mobile responsive UI (thanks to @maybebored for making the suggestion):

Mobile UI

Why another Postman alternative?

Most Postman alternatives in the market today (including Postman) require downloading a platform-specific client app, or installing a Chrome plug-in. This is needed to provide full request support such as CORS. However, this approach has a few cons:

  1. Setting up a new dev env requires downloading and installing app again.
  2. App needs to be periodically updated / patched.
  3. Takes up precious memory on dev machine.
  4. Not all platforms are supported.

Inspired by Postwoman, I fell in love with the idea of a web-based API tester. However, Postwoman doesn't support CORS requests.

Btw if you aren't sure what CORS is, scroll to bottom.

Introducing getd.io/🚀🚀🚀

getd.io/ aims to build a 100% pure web-based solution that supports all kinds of API servers, while providing a modern, fluid, dark-themed UI 😎 that are familiar to existing Postman users.

getd.io/ provides two modes:

  • ☁️ Cloud mode: the request is forwarded to the back-end to be executed by node.js, and response returned to be displayed to the users. This mode works with all request types, e.g., CORS. The website is protected by TLS so your request info is safe on the wire.
  • 💻 Browser mode: the request is sent using fetch() from local browser. This doesn't work with APIs that disallow CORS.

Note: if you are developing a local/private API server, you can only use browser mode because my cloud server doesn't have access to your private server. Since browser mode doesn't work with CORS, you will have to enable CORS for your private server to use getd.io. It's a two-line change and you can remove it before your server goes public.

import cors from "cors";
app.use(cors());
Enter fullscreen mode Exit fullscreen mode

Cloud Mode

Currently I'm using a personal dev server to support the back-end requests. If a request gets a large response (e.g., a file download) the response will be terminated after exceeding certain limit. This helps reduce my Internet cost :) ❤️ Support me in Patreon if you'd like to keep this free service running and even better, get access to advanced features with no request limits.

Features / Roadmap

Feature Support
Local Request History and Search
Local Persistent Workspace state
Permlink to share entire request with others
Request Params
Request Headers
Request Body (JSON editor, text)
Request Form (form-data, x-www-form-urlencoded)
Response Header, Body, JSON / Html prettier
Mobile Responsive
Local Multi-workspace Support
Save Workspace to Cloud
Save History to Cloud
Websocket Support
GraphQL Support
... and more!

Nice! What's next?

  1. Head over to getd.io/ and start poking around!
  2. Follow twitter to get updates.
  3. Join Slack or Discord to provide feedbacks or join discussions.
  4. Support this free service in Patreon❤️
  5. Leave a comment below to provide some feedbacks. I love feedbacks!

WTF is CORS?

Sorry I keep saying 'CORS'. You can read more here but the basic idea is that browser doesn't allow website A (which is loaded in the browser) to send API requests to website B, unless B explicitly says 'A is allowed' or 'Anyone is allowed, I don't care' in response header. This is a restriction enforced by the browser. That's why tools like Postman create their own client apps to work around it. A sample error looks like below:

Alt Text

Top comments (13)

Collapse
 
welshcuriosity profile image
welshcuriosity • Edited

I've just tried to use it, but have run into an error.

I haven't long signed up to GitHub and haven't yet completed all the bits of my profile (mainly the name field).

When I sign into getd.io I'm then getting the error:

Cannot return null for non-nullable field CurrentUser.displayName.

I'll update my GitHub profile shortly, but wanted to raise this in case you weren't aware.

(trying to include a screenshot but it's not working, so here's a link to it: thepracticaldev.s3.amazonaws.com/i...)

Collapse
 
techbos profile image
TechBos😎

Thank you for reporting! I will fix asap and let you know so you can try again.

Collapse
 
techbos profile image
TechBos😎

Hey @welshcuriosity , I have deployed a fix. Please let me know if the issue is gone. Thanks for reporting!

Collapse
 
welshcuriosity profile image
welshcuriosity

Sorry for the delay, been away for the weekend.

Just tested and it all looks good.

Cheers for getting it fixed so quickly.

Collapse
 
iain_adams profile image
Iain Adams

When you say it has CORS support? You mean that somehow you have got the browser to ignore the CORS headers? I.e. if my server responded with a specific Access-Control-Allow-Origin header would it work?

Collapse
 
techbos profile image
TechBos😎

Please see 'cloud mode' - basically it pipes your request to my backend server, which handles your request without CORS restriction, and then pipes response back to your browser.

Collapse
 
iain_adams profile image
Iain Adams

Ah I understand now! Thanks for getting back to me.

Collapse
 
maybebored profile image
Mayuran

Can you make this mobile responsive. Willing to help if you need it.

Collapse
 
techbos profile image
TechBos😎

Update: responsive mobile UI is live. Check it out and let me know if any feedbacks!

Collapse
 
techbos profile image
TechBos😎

Yep. In my road map. Working on it. Thanks for the support!

Collapse
 
ansh0390 profile image
Ansh0390

Not able to access the application. It saying server down

Some comments may only be visible to logged-in visitors. Sign in to view all comments.