Skip to content
OddsockLocal
Local
Source text

Formatting

1 wordsRuns in this browser. Nothing is uploaded.

How to use

  1. Choose Snippet format. Curl is the start.
  2. Enter the URL and the method.
  3. Add headers one per line and a body if the method should have one.
  4. Copy the snippet. Switch format if you need a second language of the same call.

What is HTTP request builder?

The request builder is the shared form behind the single-language pages. You set Snippet format, method, headers and body, and you get that one call. Format defaults to curl. Switch it to python and a GET https://example.test/api with no headers and no body becomes import requests, then requests.request("GET", "https://example.test/api", headers={}) and print(response.text).

Read more

The other formats are fetch, axios, httpie, go and php. Fetch still refuses a body on GET or HEAD. Curl still uses --globoff and --data-raw. HTTPie writes a pipeline only when there is a body. The point of this page is picking the format after the request is filled in, instead of retyping the URL on six different tools.

No format performs the request. Absolute http or https only, no username or password in the URL, headers as Name: value lines, no duplicates. If you already have a curl command and want it translated, the converter is the page that starts from the command rather than from these fields.

Use cases

  • An API example has to ship as curl for the docs and as Python for the notebook, from the same URL and headers.
  • You are not sure yet whether the snippet should be Go or PHP, and you want to flip Snippet format without retyping the body.
  • A teammate sent field values in chat and you want a command that uses --data-raw so a leading @ is not a filename.
  • You need to confirm a draft call never leaves the tab while you are still editing the path.

The same empty GET as Python

Snippet format python, method GET, URL https://example.test/api, no headers, no body.

import requests\n\nresponse = requests.request("GET", "https://example.test/api", headers={})\nprint(response.text)

Why use Oddsock

One form, seven spellings. Changing Snippet format does not rebuild the request from scratch, and it still does not send it.

Related tools

Using this tool

curl, fetch, axios, httpie, python, go and php. The single-purpose pages lock one of those and hide the choice.