HTTP request code generator
Build a request from a form and get it as cURL, fetch, Axios, Python, Go, PHP or HTTPie code.
Method
Missing a feature or found a bug in HTTP request code generator? Tell me on X (@_andrewtran) or by email.
How to use HTTP request code generator
- Choose the method and enter the URL.
- Add headers, one per line, and a body if the method takes one.
- Choose a language and copy the code.
Questions and answers
Does this send the request?
No. It only writes the code. Nothing is sent from this page, so you can safely include real tokens.
How is the content type chosen?
If you set a Content-Type header, that is used. Otherwise a body that is valid JSON is sent as JSON, and anything else as plain text.
Related tools
Query string builder
Build a properly encoded ?key=value query string from a list of parameters.UTM link builder
Build campaign links with utm_source, utm_medium and utm_campaign, encoded correctly.Conventional commit builder
Write well-formed commit messages with a type, scope, body and breaking-change footer.Git branch name generator
Make clean, consistent branch names from a ticket number and a description.