Generate code snippets

Once you’ve finalized and saved your request in Postman, you might want to make the same request from your own application. Postman lets you generate snippets of code in various languages and frameworks that will help you do this. You’ll need to click the Code link under the blue Send button to open the GENERATE CODE SNIPPETS modal.

generate code link

Selecting a language

Use the dropdown menu to select a language - some languages have multiple options. This lets you select different frameworks from which to make your request.

languages dropdown

Supported languages/frameworks

Postman currently supports the following options:

Language Framework
HTTP None (Raw HTTP request)
C LibCurl
cURL None (Raw cURL command)
C# RestSharp
Go Built-in http package
Java OkHttp
Java Unirest
JavaScript jQuery AJAX
JavaScript Built-in XHR
NodeJS Built-in http module
NodeJS Request
NodeJS Unirest
Objective-C Built-in NSURLSession
OCaml Cohttp
PHP HttpRequest
PHP pecl_http
PHP Built-in curl
Python Built-in http.client (Python 3)
Python Requests
Ruby Built-in NET::Http
Shell wget
Shell HTTPie
Shell cURL
Swift Built-in NSURLSession