Code snippets
Gud API can turn the current request into a snippet you can paste into scripts, docs, or terminal.
Supported languages
| Format | Typical use |
|---|---|
| cURL | Shell, quick repro, sharing with teammates |
| JavaScript (fetch) | Browsers and Node 18+ |
| Python (requests) | Scripts and notebooks |
| Node.js (axios) | Backend services using axios |
How to use
- Build the request (method, URL, headers, body, auth) as you would to send it.
- Use the generate code / copy-snippet control in the request UI (the exact label may vary by version).
- Copy the snippet to the clipboard.
Quick access
The Copy as cURL button is available directly in the URL bar for quick access -- no need to open the full code generation panel when you just need a cURL command.
The snippet reflects the resolved URL and headers as much as possible; you may still need to move secrets to environment variables in your own code.
Related
- Sending requests
- Environments for
in reusable snippets