All Projects → dduan → cURLLook

dduan / cURLLook

Licence: MIT license
Represent your NSURLRequest with a cURL command.

Programming Languages

swift
15916 projects
objective c
16641 projects - #2 most used programming language
ruby
36898 projects - #4 most used programming language

This μ-framework serializes your NSURLRequest object to a cURL command, so you can convey to a backend person clearly what kind of HTTP request your code is making.

let request: NSURLRequest
let aSession: NSURLSession

// … after you created your URL session and request, this will give you
// a cURL command that also performs this request
print(request.cURLRepresentation(withURLSession: aSession))


// alternatively, you can use this convenient proprety without a session:
print(request.cURLString)

Install

Carthage (recommended)

Include the following in your Cartfile:

github "dduan/cURLLook"

CocoaPods

The usual way:

platform :ios, '8.0'
use_frameworks!

target 'MyApp' do
  pod 'cURLLook'
end

Credit

The code is an adaption from Alamofile

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].