# Generate code snippets from API requests Postman can convert an API request into a code snippet. You can then use the generated code snippet in your front-end application to make calls to an API. Postman can generate code snippets for a variety of programming languages and client libraries, including Postman CLI, C#, JavaScript, and NodeJS. This guide has information about generating code snippets from API requests. For information about generating server-side boilerplate code from an API specification, see [Generate server-side code in the Postman API Builder](/docs/design-apis/api-builder/develop-apis/generating-server-code/). ## Generate code snippets in Postman 1. Open the request you want to use for a code snippet, then select Code icon **Code** in the right sidebar. Open code snippets 2. Select a [language or framework](#supported-languages-and-client-libraries) from the dropdown list. 3. Select Copy icon **Copy snippet** to copy the code snippet to your clipboard. Copy code snippet to clipboard 4. For more configuration options, like the indentation type and count, select Settings icon **Code settings** next to the dropdown list. The settings vary based on the chosen language or framework. ## Supported languages and client libraries Postman supports the following languages and client libraries: | **Language** | **Framework** | | ------------ | --------------------------------------------------------------------------------------------------------------------------------- | | C# | HttpClient | | C# | [RestSharp](http://restsharp.dev/) | | cURL | [cURL](https://curl.se/) | | Dart | [Dio](https://pub.dev/packages/dio) | | Dart | HTTP | | Go | [http package](https://pkg.go.dev/net/http) | | HTTP | (Raw HTTP request) | | Java | [OkHttp](https://github.com/square/okhttp) | | Java | [Unirest](https://github.com/Kong/unirest-java) | | JavaScript | [Fetch](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) | | JavaScript | [jQuery](https://api.jquery.com/jquery.ajax/) | | JavaScript | [XHR](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest) | | Kotlin | [OkHttp](https://square.github.io/okhttp/) | | C | [LibCurl](https://curl.se/libcurl/c/) | | NodeJS | [Axios](https://github.com/axios/axios) | | NodeJS | [Native](https://nodejs.org/api/http.html) | | NodeJS | [Request](https://github.com/request/request) | | NodeJS | [Unirest](https://github.com/Kong/unirest-nodejs) | | Objective-C | [NSURLSession](https://developer.apple.com/documentation/foundation/urlsession) | | OCaml | [Cohttp](https://github.com/mirage/ocaml-cohttp) | | PHP | [cURL](https://www.php.net/manual/en/ref.curl.php) | | PHP | [Guzzle](https://docs.guzzlephp.org/en/stable/) | | PHP | [Http\_Request2](https://www.php.net/manual/en/reserved.variables.request.php) | | PHP | [pecl\_http](https://mdref.m6w6.name/http) | | Postman CLI | [Postman CLI](/docs/postman-cli/postman-cli-options/#run-requests) | | PowerShell | [RestMethod](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/invoke-restmethod?view=powershell-7) | | Python | [http.client](https://docs.python.org/3/library/http.client.html) (Python 3) | | Python | [Requests](https://www.w3schools.com/python/module_requests.asp) | | R | [httr](https://cran.r-project.org/web/packages/httr/index.html) | | R | [RCurl](https://cran.r-project.org/web/packages/RCurl/index.html) | | Ruby | [NET::Http](https://docs.ruby-lang.org/en/2.0.0/Net/HTTP.html) | | Rust | [reqwest](https://docs.rs/reqwest/latest/reqwest/) | | Shell | [Httpie](https://github.com/httpie/httpie) | | Shell | [wget](https://www.gnu.org/software/wget/) | | Swift | [URLSession](https://developer.apple.com/documentation/foundation/urlsession) | To add a new language or setting, you can contribute to [Postman's open-source project](https://github.com/postmanlabs/postman-code-generators).