Skip to content
Vegha Docs

Code Generation

Vegha can turn any request into ready-to-run client code. This is useful for handing an API call to a colleague, dropping it into an application, or documenting how an endpoint is called.

With a request open, open the code-generation panel. It shows the request expressed as client code, with a selector for the target language or HTTP client.

Vegha generates code for six targets:

TargetLanguage / library
curlShell command
Node.js fetchJavaScript
Python requestsPython
Go net/httpGo
C# HttpClientC#
Java OkHttpJava

Select a target and the panel updates to show the equivalent snippet.

The snippet mirrors the request as configured:

  • The URL, including query parameters
  • The HTTP method
  • All headers
  • The request body
  • The request’s auth, where it can be expressed in that target

Copy the generated code from the panel and paste it wherever you need it — a terminal, a script, or an application.