Import a request with Copy as cURL
Copy a request from the browser Network panel and open it in API Tester.
In short
Your browser can copy any request it made as a cURL command. Paste that command into {{brand}} and it opens as a request with its method, address, headers and body - ready to send again or save.
Before you start
- Who: anyone can open a copied command as a request. Saving it into a project needs you to be signed in and hold Edit on that project.
- Plan: none for importing; sending counts as usual (see /help/settings/plan-limits).
- First: copy the request as cURL from your browser's Network panel.
Steps
- Open your browser's developer tools and select Network.
- Perform the action you want to reproduce.
- Right-click the request and choose Copy as cURL.
- Paste it into search, or use "Import cURL" in Single request.
- Review the URL, headers, body and token, then send.
Result: the request is filled in as the browser sent it.
Good to know
- The importer reads Bash, Windows Command Prompt and PowerShell commands.
- It takes the method (a command with data and no -X becomes POST), the full address and every -H header. It takes the body from -d, --data, --data-raw, --data-binary, --data-urlencode or --json. It reads -u as a Basic header and -b as a Cookie header.
- Connection headers such as Host are removed. Multipart uploads (-F) are not imported, only one address is imported at a time, and the import says what it ignored.
A copied command carries a live token It usually holds your session token, which will expire. If you save it into a header, treat the saved request like the token, and move the credential into an authentication profile.
If something goes wrong
- The request answers 401 later: the copied session token expired. Sign in again in the app and copy a fresh command, or use an authentication profile.
- A file upload is missing: -F uploads are not imported. Add the file in the Body tab.
Related
- /help/api-testing/paste-to-import
- /help/api-testing/authentication-profiles