Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dduan/curllook
Represent your NSURLRequest with a cURL command.
https://github.com/dduan/curllook
Last synced: about 1 month ago
JSON representation
Represent your NSURLRequest with a cURL command.
- Host: GitHub
- URL: https://github.com/dduan/curllook
- Owner: dduan
- License: mit
- Created: 2015-09-06T00:30:40.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-03-31T18:12:28.000Z (almost 9 years ago)
- Last Synced: 2024-12-31T18:44:08.201Z (about 2 months ago)
- Language: Swift
- Size: 10.7 KB
- Stars: 16
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
This μ-framework serializes your `NSURLRequest` object to
a [cURL](http://curl.haxx.se) command, so you can convey to a backend person
clearly what kind of HTTP request your code is making.```swift
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](https://github.com/Alamofire/Alamofire)