A copied request can carry more baggage than you expect: a shell variable, a real bearer token, or a file-upload option that a converter cannot interpret. Start with a literal, fictional request. Generate the example, then review it as code.
Reduce the request to its essential parts
In cURL to code, load the release request. The URL is an example destination. The tool reads it as text and never sends the request.
curl 'https://api.example.com/releases?limit=5' -H 'Accept: application/json'
This request has one HTTP(S) URL and one header. The missing explicit method means GET. A command with a literal body defaults to POST unless you provide a supported method. Do not combine a GET or HEAD method with a body; the converter rejects that combination.
Generate both language variants
- Choose JavaScript and generate the code. Check the URL, method, and header values in the result.
- Copy the result or download the text output. JavaScript output uses
fetchwith manual redirect handling. - Choose Python and generate again. The Python example imports
requests, sets a timeout, and disables automatic redirects. - Read the code in the context where it will be used. Add application-specific response handling, error handling, and credential management in your project.
Desk note. The browser tool needs no package installation. The generated Python example requires the requests package in the environment where you later run it. The tool does not install or run that package.
Use a literal JSON body when documenting a POST
A plain text body is supported. For a small JSON example, include an appropriate Content-Type header and quote the body literally. Replace real values with invented data before pasting.
curl 'https://api.example.com/releases' -X POST -H 'Content-Type: application/json' --data-raw '{"title":"Unicode search","published":true}'
The converter carries the body as text into the generated request. It does not check whether your API accepts that JSON, or whether the fields match your documentation. Use the JSON Schema validator separately if you have a supported schema for the example.
Treat unsupported shell features as a repair prompt
File uploads, shell expansion, multiple URLs, duplicate header names, and unsupported options are rejected. The source remains in place so you can simplify it. Try the file-upload example to see that recovery path.
If your original command uses $API_TOKEN, do not expand it into a real secret to satisfy a converter. Make a separate documentation example with an obvious fictional value. Likewise, do not replace an upload option with an entire private file. Explain multipart uploads in your project’s dedicated examples instead.
Review the generated snippet as a reader
Make sure the language variant fits the guide, the method is clear, and every placeholder is explained. Generated request code is a starting point: it does not promise retry behavior, pagination, SDK ergonomics, or production error handling.
On a small screen, the source appears before the result. Change the language, generate again, and copy the current output. The interface clears older output when the source changes so a previous request does not get mistaken for the new one.