Developer Tools
API Test: Send a Request and Read the Response
Send a request to an API endpoint you choose and read the status, round-trip time and response preview.
Request builder
- Status
- -
- Time
- -
- Size
- -
- Content type
- -
The response preview appears here. Only text is shown, cut to 2,000 characters.
The request goes directly from this tab to the address you enter. CORS rules and mixed-content rules still apply, and no proxy is used.
Enter an http or https URL, then press Send request.
This test runs entirely in your browser. Nothing is uploaded or stored on a server.
What the builder sends
The form turns your choices into a real fetch request from the tab. The method selector sets the verb, the URL field sets the destination and the headers box adds pairs to the request. A POST body is sent as typed, with no automatic content type, because the endpoint, not the page, should decide what the payload means.
The request uses credentials omitted and follows redirects. Cookies from this site are not attached to the call, which keeps the test independent of any session here.
Reading the four numbers
Status is the code and reason phrase from the response. A two hundred series means the endpoint accepted the request; four hundred series means the request itself was rejected; five hundred series means the endpoint failed while handling it.
Time is the gap between calling fetch and reading the first response object. It includes name resolution, connection setup, TLS and the server's first byte, but not the time needed to read the full body.
Size comes from the Content-Length header when the server sends one. Otherwise the page measures the decoded text it received, which can be smaller than the bytes on the wire when compression is used.
Content type is the header value the server supplied. A page returning HTML while claiming JSON is a common cause of parsing bugs in client code.
Why CORS decides so much
A browser will happily send a request to another origin, but it will only hand the response to JavaScript when the destination allows it. That rule protects users from pages reading private services through their browser. When the read is blocked, the console shows a CORS message and the page shows a TypeError with guidance rather than a status code.
Simple GET and POST requests usually go straight out. Custom headers trigger a preflight OPTIONS request, and the server must answer with matching allow headers before the real call is made. A status of zero in some tools reflects the same blocked read.
Working with the preview
The preview strips the body to text and cuts it at two thousand characters. JSON keeps its indentation if the server sent it, and HTML appears as markup rather than rendered content, which makes it safe to paste. To pretty-print a JSON response, copy it into the JSON formatter. To check a pattern against the returned text, use the regex test.
When an endpoint needs a token during development, keep it in a short-lived value and reset the form afterwards. The privacy permissions check explains what this site can and cannot read, and the device info page lists the browser values that affect which requests are allowed.
A second endpoint
Reset the form between two endpoints rather than editing the first one. Headers and bodies left from a previous request are the most common reason a new call fails, and a clean form makes the status line trustworthy. Use HEAD when only the status and headers matter, and keep the preview for calls whose body you need to read.
Redirects are followed automatically, so a final status may describe a different host than the URL you typed. The time figure covers the whole chain, which is why a redirect can look slow even when each hop answered quickly.
How to use this test
-
Choose a method and URL
Pick GET, POST or HEAD from the Method list and enter a complete http or https address.
-
Add headers
Type one Name colon value pair per line when the endpoint needs an accepted content type or a token.
-
Describe the body
For POST, place the payload in the Request body field, usually as JSON.
-
Send the request
Press Send request and watch the status, time, size and content-type readouts fill in.
-
Read the preview
The preview shows text only, cut to two thousand characters, so binary responses appear as unreadable fragments.
How to read the numbers
| Signal | Typical reading | How to read it |
|---|---|---|
| Status | 200 to 299 | 2xx accepted, 4xx rejected by the endpoint, 5xx failed on the server. |
| Time | 5 to 500 ms | First byte from this browser and network, not server processing alone. |
| Size | Header or measured | Falls back to decoded text size when Content-Length is absent. |
| Content type | application/json | A mismatch with the actual body explains many client parsing errors. |
| Timeout | 10 seconds | The request is aborted and reported as a timeout. |
Browser support
| Browser | Support | Notes |
|---|---|---|
| Chrome and Edge | Supported | Fetch with custom headers and abort signals. |
| Firefox | Supported | Cross-origin restrictions follow the same rules. |
| Safari | Supported | Some private headers are stripped before sending. |
| Mobile browsers | Supported | Same-origin policy applies without exception. |
Tips
- Test a known endpoint first, such as a public status route, to confirm that the browser allows the origin.
- Keep test tokens short-lived; anything typed here is visible in the page and in the browser history field.
- Use HEAD when you only need status and headers; it avoids transferring a body you will not read.
Frequently asked questions
Why does a request that works in a terminal fail in the browser?
Browsers enforce cross-origin rules. The server must send an Access-Control-Allow-Origin header for this origin, and the request may also be preceded by an automatic preflight for custom headers.
What causes the mixed-content warning?
An https page cannot call an http endpoint. Change the target to https, or open this page over http while testing a local service.
Can I use this page to call an internal admin API?
Only if that API allows web origins and the browser can reach it. The page sends no proxy, so private addresses that need a VPN may still be blocked by the network.
Is the response stored anywhere?
The preview lives in the page until you reset or leave it, and nothing is written to a project database. History and cache behaviour is governed by your browser settings.