NetworkNew

Test API Online: REST Client with cURL Export

Send HTTP requests to CORS-enabled APIs from your browser and copy them as cURL

100% client-side — your data never leaves your browserNo data stored or uploadedFree for lifetime · No signup

Requests go directly from your browserto the API — there is no proxy and nothing is stored on our servers. The API must allow CORS requests from this page; for APIs that don't, use the cURL export below or Postman. Cookies are not sent.

Shared links never include the Auth tab's token or password.

Appended to the URL's query string (values are URL-encoded for you).

cURL
curl 'https://techloghub.com/api/mock/posts?_limit=3' \
  -H 'Accept: application/json'

How this online API tester works (and its one big limit)

Everything runs in your browser. When you press Send, the page builds the request from the method, URL, query params, headers, body and auth you entered and sends it with the browser's own fetch() — straight from your machine to the API. There is no TechLogHub proxy in the middle, nothing is logged or stored on our servers, and cookies are not attached. The status, response time (measured with performance.now(), so it includes DNS, TLS and network time), size, headers and body come back from that single request.

The limit that follows from this is CORS. Browsers only let a page read a response from another origin if the API says so with an Access-Control-Allow-Origin header, and requests with a JSON body, an Authorization header or any custom header are preceded by an OPTIONS preflight the API must also accept. Public APIs designed for browsers (GitHub's REST API, most mock and sandbox APIs, your own API with CORS enabled) work. Many internal and server-to-server APIs do not, and when that happens the browser reports only a generic network error — the tester tells you so instead of guessing. For those APIs, use Copy as cURL and run the request in a terminal, or a desktop client like Postman or Insomnia, neither of which is bound by CORS.

Reading the response: status, timing, size and headers

The status line shows the HTTP code and reason: 2xx success, 3xx redirect (fetch follows redirects automatically and the tester notes the final URL), 4xx a problem with your request — 401 missing or bad credentials, 403 not allowed, 404 wrong path, 422 validation failed — and 5xx a server error. Size is the number of bytes in the response body after decompression.

JSON responses are pretty-printed automatically; anything else is shown as text, and binary types such as images are summarised rather than dumped. One thing that surprises people: the headers list is not the complete set the server sent. Browsers expose only CORS-safelisted response headers (Cache-Control, Content-Language, Content-Length, Content-Type, Expires, Last-Modified, Pragma) plus whatever the server names in Access-Control-Expose-Headers. If you need to see Set-Cookie or a custom X- header the API does not expose, curl -i shows everything.

Copy as cURL, and when to switch to Postman

Every request you build is mirrored as a curl command below the response, quoted for bash and zsh, including headers, the body and the Authorization header the Auth tab generates. Paste it into a terminal to run the same request without CORS, into a bug report so someone else can reproduce it, or into another tool: Postman's Import → Raw text accepts curl commands, and the cURL to Fetch and cURL to Axios converters on this site turn it into code.

This page is for quick checks: is the endpoint up, what does it return, does my token work, is my JSON body accepted. Postman, Insomnia, Bruno or HTTPie make more sense once you need saved collections, environments and variables, scripted tests, file uploads, or APIs that do not allow CORS.

Try it on a mock API

The URL field starts with TechLogHub's free mock REST API, which allows CORS from any origin. Send the default GET to list three fake posts, switch to POST with the JSON body to see a 201 Created echo, or request /api/mock/users/999 to see a 404. Endpoints, filters and pagination are documented on the Mock REST API tool page.

How to use the Test API Online: REST Client with cURL Export tool

  1. 1

    Choose a method and enter the URL

    Pick GET, POST, PUT, PATCH, DELETE, HEAD or OPTIONS and paste the endpoint. Add query parameters on the Params tab instead of hand-encoding them.

  2. 2

    Add headers, body and auth

    Set headers, write a JSON (validated as you type), plain-text or form-URL-encoded body, and generate a Bearer or Basic Authorization header on the Auth tab.

  3. 3

    Send and inspect the response

    See the status code, response time, size, the headers the browser exposes and a pretty-printed JSON body.

  4. 4

    Copy as cURL or share

    Copy the equivalent curl command, or a link that restores the request (without credentials) for a teammate.

Frequently asked questions

Why do I get a CORS or network error?

The API did not allow a request from this page: it either sent no Access-Control-Allow-Origin header or rejected the preflight. Browsers hide the exact reason from JavaScript (DevTools → Console shows it). There is no proxy to route around it, so copy the request as cURL and run it in a terminal, or use Postman.

Is my request or API key sent to TechLogHub?

No. The request goes directly from your browser to the API you entered; TechLogHub never sees it. Tokens and passwords on the Auth tab stay in the page's memory, are not saved, and are left out of shared links. They are in the cURL output, so treat that like a secret.

Is this an online Postman alternative?

For quick one-off requests, yes: method, params, headers, JSON or form body, Bearer and Basic auth, and cURL export. It has no collections, environments, scripting or file uploads, and it only reaches APIs that allow CORS — Postman's desktop app has none of those limits.

Can I test an API running on localhost?

Sometimes. Chrome and Firefox allow requests from this https page to http://localhost and http://127.0.0.1, but your local server must send CORS headers, and some browsers block public sites from calling private addresses. If it fails, run the cURL command instead.

Why can't I set the Host, Origin or Cookie header?

Browsers forbid scripts from setting a list of headers including Host, Origin, Cookie, Referer and Content-Length, and silently drop them. curl lets you set any header, so use the cURL export when a request depends on one.

Related on TechLogHub

Get the next tool before you need it

One email a week: new and trending developer tools, fresh comparisons, and what shipped. Unsubscribe in one click.