Latest 0.0.3
License MIT
Platforms ios 10.0, requires ARC
Dependencies GzipSwift

URLRequest extension that creates a cURL command string



URLRequest-cURL is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'URLRequest-cURL'

Example on how to use

// let request = URLRequest()

Simple var ‘cURL’ gives the following string:

curl -X POST '' -H 'Accept-Language: en' -H 'Content-Length: 91' -H 'Content-Type: application/json' -d '{
  "email" : "[email protected]",
  "returnSecureToken" : true,
  "password" : "password"

You can also choose to ommit http headers

// let request = URLRequest()
print(request.cURL(withHeaders: false))

function ‘cURL’ ommitting headers gives the following string:

curl -X POST '' -d '{
  "email" : "[email protected]",
  "returnSecureToken" : true,
  "password" : "password"

Latest podspec

    "name": "URLRequest-cURL",
    "version": "0.0.3",
    "swift_version": "4.2",
    "summary": "Creates cURL Command from URLRequest",
    "description": "Featuresn1. Creates a cURL command that can be executed on CLIn2. cURL string can be easily imported into Postman application.",
    "homepage": "",
    "license": "MIT",
    "authors": {
        "depoon": "[email protected]"
    "source": {
        "git": "",
        "tag": "0.0.3"
    "platforms": {
        "ios": "10.0"
    "requires_arc": true,
    "source_files": "Source/**/*",
    "dependencies": {
        "GzipSwift": []

Pin It on Pinterest

Share This