Back Network

HTTP Request Builder

Compose HTTP calls visually — method, URL, headers, query, body — and copy the equivalent curl, fetch, axios, Python requests, or Node code. Send live to inspect status, headers, and body (subject to CORS). Runs in your browser.

Last updated: May 2026 · Reviewed by FreeDevTool API engineering team

Headers

Query Parameters


      
CORS note: The browser only allows in-page requests when the target API sets permissive Access-Control-Allow-Origin headers. Internal or auth-protected APIs will usually fail with a CORS error — copy the generated cURL or Python code and run it from a terminal instead.
Copied!

HTTP requests in 2026 — methods, headers, status codes, and the API patterns that ship

HTTP is the protocol layer every networked product runs on. Even when you are calling a "GraphQL API", a "gRPC service", or a "WebSocket endpoint", you are still riding HTTP/1.1, HTTP/2, or HTTP/3 underneath. Knowing the protocol cold pays off in every debugging session — every "why does this work in Postman but not in my code?" question, every CORS preflight mystery, every 401-when-it-should-be-403, every cached-response surprise. This guide is the working reference for the protocol fundamentals (RFC 9110), the headers that actually matter, the auth schemes that secure modern APIs, and the cURL → code patterns that live in every backend codebase.

HTTP methods — what each one is for, and what's idempotent

MethodPurposeBody?Safe?Idempotent?
GETRead a resourceNo (per RFC, ignored if present)YesYes
HEADRead headers only (no body)NoYesYes
POSTCreate / non-idempotent actionYesNoNo
PUTReplace a resource at a known URLYesNoYes
PATCHPartial updateYesNoNo (typically)
DELETERemove a resourceUsually noNoYes
OPTIONSDiscover allowed methods, CORS preflightNoYesYes
CONNECTTunnel (proxies use this)NoNo
TRACEDiagnostic loopbackNoYesYes

"Safe" means the request should not change server state. "Idempotent" means N identical requests have the same effect as one. These properties drive practical decisions:

The headers you actually need to know

HeaderDirectionPurpose
Content-TypeBothWhat format the body is. application/json, multipart/form-data, application/x-www-form-urlencoded.
AcceptRequestWhat formats the client can handle. Most APIs only return one, but content-negotiation libraries respect it.
AuthorizationRequestBearer <token> for JWT/OAuth, Basic <b64> for HTTP Basic.
User-AgentRequestIdentifies your client. Many APIs require it; some rate-limit by it.
Cache-ControlBothCaching directives. no-store, max-age=300, private, public.
ETag / If-None-MatchBothConditional requests; server returns 304 Not Modified.
Last-Modified / If-Modified-SinceBothSame idea, timestamp-based.
Idempotency-KeyRequestStripe, Square, Square Cash all support — safe POST retries.
X-Request-Id / traceparentBothDistributed-tracing correlation. Echo it back in logs.
Access-Control-*ResponseCORS headers. Server-controlled; clients read them.
Content-EncodingResponsegzip, br (Brotli), zstd. The server has compressed the body.
Set-CookieResponseSet a cookie. HttpOnly; Secure; SameSite=Lax are the defaults you want.

Status code groups — which ones mean what

RangeClassExamples
1xxInformational100 Continue, 101 Switching Protocols (WebSocket upgrade)
2xxSuccess200 OK, 201 Created, 202 Accepted (async), 204 No Content
3xxRedirection301 Permanent, 302 Found (temp), 304 Not Modified, 308 Permanent (preserve method)
4xxClient error400 Bad Request, 401 Unauthorized, 403 Forbidden, 404 Not Found, 409 Conflict, 422 Unprocessable, 429 Too Many Requests
5xxServer error500 Internal, 502 Bad Gateway, 503 Service Unavailable, 504 Gateway Timeout

Two distinctions every junior dev gets wrong:

Authentication schemes — JWT, OAuth, API key, HMAC, mTLS

Picking auth correctly the first time saves a rewrite later. For browser-facing APIs, Bearer JWTs (issued via OAuth 2.0 PKCE) are the modern default — short-lived access tokens with refresh tokens stored in HttpOnly cookies. For server-to-server, API keys with rotation or HMAC request-signing are simpler. To inspect or mint a Bearer token while you're testing here, the JWT decoder shows the payload claims and the JWT generator mints signed test tokens with HS256/RS256/ES256.

SchemeHeaderUse for
Bearer (JWT / OAuth)Authorization: Bearer <token>Modern APIs; standard.
HTTP BasicAuthorization: Basic base64(user:pass)Internal services, dev tools. Requires HTTPS.
API Key (header)X-API-Key: ... or customServer-to-server. Rotate regularly.
API Key (query param)?api_key=...Avoid — leaks into logs and Referer headers.
HMAC (request signing)Authorization: AWS4-HMAC-SHA256 ...AWS, Cloudflare, anywhere replay-protection matters.
Mutual TLS (mTLS)Client certService-to-service in zero-trust networks.
Cookies (Set-Cookie)Implicit on every requestBrowser-based apps; pair with CSRF tokens.

CORS — the browser policy that confuses everyone

The Same-Origin Policy stops a page on evil.com from reading responses from bank.com. CORS is the carve-out: a server can opt-in to allow specific cross-origin requests. The flow:

  1. Simple requests (GET/HEAD/POST with simple Content-Type) — browser sends the request directly. Server responds with Access-Control-Allow-Origin: <origin> or *.
  2. Preflighted requests (PUT, DELETE, custom headers, JSON body) — browser sends an OPTIONS preflight first. Server must respond with Access-Control-Allow-Methods, Access-Control-Allow-Headers, and Access-Control-Allow-Origin.
  3. Credentialed requests (cookies, Authorization header, client certs) — server must respond with Access-Control-Allow-Credentials: true AND a specific origin (not *).

The single biggest debugging tip: CORS errors only happen in browsers. The same request from cURL, Postman, or your Node backend works fine. If your browser request fails but cURL succeeds, it's CORS — fix the server.

cURL — the lingua franca of API debugging

The cURL output is the de-facto sharing format. Common flags:

curl -X POST https://api.example.com/users \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{"email":"alice@example.com","name":"Alice"}' \
  -i        # include response headers
  -v        # verbose: show request & response in detail
  -L        # follow redirects
  -s        # silent (no progress bar)
  -w "%{http_code}\n"   # write out specific values
  --fail-with-body      # exit non-zero on 4xx/5xx but still print body
  --resolve api.example.com:443:127.0.0.1   # bypass DNS for local testing

HTTP/1.1 vs HTTP/2 vs HTTP/3 — what changes

For most APIs, HTTP/2 is the default, HTTP/3 is the upgrade path. From the application code's perspective the API is identical — you write fetch() or requests.get() the same way. Performance differences show up in p99 latency and concurrent-request scenarios.

Idempotency keys — the pattern that makes retries safe

Stripe, Square, Adyen, Paddle, and every modern payments API support idempotency keys. The client sends a unique key with the POST; the server stores the response keyed by that key. If the client retries (because the network dropped, or the server timed out), the server returns the cached response instead of double-charging. The pattern:

POST /charges HTTP/1.1
Idempotency-Key: 09cb3b3f-6e7f-4bba-8a4d-5d07c5b2c91a
Content-Type: application/json

{"amount": 1000, "currency": "usd"}

Use a UUID v4 generated once per logical operation. Don't reuse a key across distinct operations or you'll get the cached response from the previous one.

Common HTTP-request mistakes

Frequently Asked Questions

What is an HTTP request builder?
An HTTP request builder is a visual tool for constructing HTTP requests — pick a method, type a URL, add headers and query params, paste a body — and see the equivalent code in multiple languages. It's the lightweight cousin of Postman or Insomnia: handy when you just need a quick curl snippet, want to show a colleague exactly what request you sent, or need to turn a working browser DevTools request into production code without hand-editing escape sequences.
What code formats does this tool generate?
Five outputs are generated live on every keystroke: cURL with proper single-quote escaping and \ line continuations for readability, browser fetch(), axios, Python requests (using json= when Content-Type is JSON, data= otherwise), and Node fetch. Each tab has its own copy button, so moving code into a script, notebook, or CI job takes a single click.
Why does sending the request fail with a CORS error?
Browsers enforce the Same-Origin Policy: cross-origin fetch() calls only succeed when the target server responds with a permissive Access-Control-Allow-Origin header (and handles the CORS pre-flight for non-simple requests). Most internal or authenticated APIs don't, so the browser blocks the response — not because the server is down, but because the browser refuses to expose it. CORS only restricts browser JavaScript. Copy the generated cURL, Python, or Node snippet and run it from a terminal to bypass CORS entirely.
Does this tool store or log my requests?
No. The entire builder runs in your browser — code generation is local JavaScript, and when you click Send request the call goes directly from your browser to the target URL. Nothing is proxied through this site. That said, use caution: anything you paste into the tool stays in your browser tab's memory until you close it, so avoid pasting long-lived production API keys or customer-specific bearer tokens into any online builder (including this one).
How do I send a JSON body?
Switch the method to POST, PUT, or PATCH, click the Content-Type: application/json quick-add button, and paste your JSON into the body textarea. Enable Validate JSON to confirm the syntax before sending — the label will turn green when the body parses cleanly. The generated cURL output will quote the body safely with single quotes and escape any internal single quotes using the '\'' pattern. Python output automatically switches to json= so requests serializes the payload and sets Content-Type for you.
Why do GET and HEAD requests not show a body field?
Per RFC 9110, GET, HEAD, DELETE (usually), and OPTIONS requests should not carry a message body — their semantics are defined by the URL and headers alone. Some servers technically accept a body on GET, but browsers, proxies, and caches may strip it, so it's unreliable. The tool hides the body field for GET/HEAD to match common practice; if you need to send a payload with DELETE for a specific API (Elasticsearch uses this pattern), paste it while on POST or PUT first, then switch the method — the body persists.
How are query parameters encoded?
Query params are assembled using URLSearchParams semantics (the same rules the built-in URL object applies), so spaces become +, reserved characters are percent-encoded, and duplicate keys produce repeated parameters (?tag=a&tag=b) — the standard way most APIs expect array-valued params. If your URL already contains a query string, the new params are appended with & instead of ?.

Browse all 50 free developer tools

All tools run in your browser, no signup required, nothing sent to a server.