-
Notifications
You must be signed in to change notification settings - Fork 5
Code Generation
Turn the current request into copy-pasteable code for another language or tool.
Use the Generate code action in the URL bar (the </> code icon; on narrow widths it's in the overflow menu). A dialog opens with a target dropdown, a live preview, and COPY / CLOSE buttons.
| Target | Output |
|---|---|
| cURL | A curl command (default) |
| JavaScript — fetch | Browser fetch() call |
| Node.js — axios |
axios request (uses form-data for multipart) |
| Python — requests |
requests call |
| Go — net/http | A runnable main using the standard library |
| Java — OkHttp | An OkHttp Request / Response
|
Pick a target and the preview updates instantly. COPY puts it on the clipboard.
- Method, URL, headers, and body from the request.
-
Auth (Authentication): bearer/basic become an
Authorizationheader; API key becomes a header or query parameter — matching how the request would actually be sent. - Content-Type consistent with the Building Requests (urlencoded, octet-stream for binary, multipart handled by the language's form encoder).
-
Body shape per type: raw verbatim; urlencoded as
k=v&…; multipart via the target's form API (file parts are noted as comments where a language can't inline a file); binary as a file reference.
{{variables}} are left un-interpolated in the generated code, so you can paste the snippet and wire in your own secrets/values. (If you want resolved values, define them in the active Environments and Variables — but the export deliberately preserves the placeholders.)
New targets are easy to add in the codebase (each is a small formatter; the export dialog lists them automatically). If you'd like another language, open an issue or PR — see Building from Source.
Getman on GitHub · Releases · Live demo · Local-first HTTP client — no account, no cloud, no telemetry.
Start here
Core
Variables & automation
More features
- History
- Cookies
- Realtime WebSocket and SSE
- Code Generation
- Command Palette
- Keyboard Shortcuts
- Auto-Update
Configuration
Project