So I built a free online API builder with CORS support π (and why another Postman alternative)
(Source/Credits: https://dev.to/getd/getd-io-an-online-api-request-tester-builder-with-cors-support-3d3m)
TL;DR Use getd.io/ to test APIs with only your browser - No app or plug-in needed. Support...
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:
And here is the updated mobile responsive UI (thanks to @maybebored for making the suggestion):
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.
javascript
import cors from "cors";
app.use(cors());
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?
- Head over to getd.io/ and start poking around!
- Follow twitter to get updates.
- Join Slack or Discord to provide feedbacks or join discussions.
- Support this free service in Patreonβ€οΈ
- 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:
Comments section
ansh0390
•May 1, 2024
Not able to access the application. It saying server down
ambobartok
•May 1, 2024
Sweet!!! Just tried it out. Was getting blocked by the requirement for CORS support at Postwoman.io.
Am I missing the place to specify a username and password to log in to the remote system when posting? Thanks for making this!
techbos Author
•May 1, 2024
We currently support github login only. Let me know if you run into any issues.
welshcuriosity
•May 1, 2024
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...)
techbos Author
•May 1, 2024
Hey @welshcuriosity , I have deployed a fix. Please let me know if the issue is gone. Thanks for reporting!
techbos Author
•May 1, 2024
Thank you for reporting! I will fix asap and let you know so you can try again.
iain_adams
•May 1, 2024
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?
techbos Author
•May 1, 2024
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.
maybebored
•May 1, 2024
Can you make this mobile responsive. Willing to help if you need it.
techbos Author
•May 1, 2024
Update: responsive mobile UI is live. Check it out and let me know if any feedbacks!
techbos Author
•May 1, 2024
Yep. In my road map. Working on it. Thanks for the support!