Create Request from Code
Paste a code snippet — a cURL command, a Postman-generated C# HttpClient call, a Python requests script, a JavaScript fetch, and more — and Rostyman turns it into a ready-to-send request: method, URL, query parameters, headers, and body. It runs entirely offline using built-in parsers — no AI required.
Opening the dialog
There are two ways in:
- Toolbar — click the
</>(Create from Code) icon in the request toolbar. - Sidebar — right-click a collection or folder → Import from Code.
Paste, detect, preview
- Paste your snippet into the box.
- Rostyman auto-detects the language (shown above the preview); override it any time with the language dropdown.
- A live preview shows exactly what will be created — method, URL, params, headers, and body — and flags anything it couldn't map.
Import vs Create
When you confirm, you choose how the parsed request lands:
- Import — replaces the current request tab with the parsed request. Useful for dropping a snippet into the tab you're already working in; the scripts on that tab are preserved.
- Create — opens the parsed request in a new tab. (When you started from a collection or folder right-click, it's saved as a new request there instead.)
Supported languages
17 languages are recognized:
| cURL | HTTPie |
C# HttpClient | PowerShell Invoke-WebRequest |
Python requests | Python httpx |
JavaScript fetch | axios |
Node.js fetch | PHP cURL |
Go net/http | Ruby net/http |
Java HttpClient | Kotlin OkHttp |
Swift URLSession | Dart http |
Rust reqwest |
Rostyman also generates snippets in these same languages (from a request, via the Code panel) — so you can round-trip: copy a snippet out of any tool, paste it in here, and send it.
What gets parsed
- Method and URL — query-string parameters are split out into the Params tab.
- Headers — including auth headers like
Authorization. - Request body — raw JSON, text, and XML, plus common form bodies. Multi-line and nested JSON is handled.
Where a snippet contains something Rostyman can't map cleanly, the preview tells you what was skipped, so nothing is silently lost.
Tips
- Leading/trailing whitespace and shell line-continuations (
\) are handled automatically. - If auto-detect picks the wrong language, set it manually — the preview updates instantly.
- Nothing leaves your machine: parsing is local, with no network or AI call.