Skip to content

Latest commit

 

History

History
67 lines (42 loc) · 1.5 KB

README.md

File metadata and controls

67 lines (42 loc) · 1.5 KB

YYURLRequest

CI Status Version License Platform

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

Installation

YYURLRequest is available through CocoaPods or Carthage. To install it, simply add the following line to your Podfile or Cartfile:

CocoaPods

pod 'YYURLRequest'

Carthage

github "Pircate/YYURLRequest"

Usage

Import

#import <YYURLRequest/YYURLRequest.h>

Request with cache

YYURLRequest *request = [YYURLRequest requestWithBaseURL:[NSURL URLWithString:@""] path:@"" parameters:@{}];
request.cache(^(id response) {
        
}).then(^(id response) {
        
}).catch(^(NSError *error) {
        
});

Request without cache

request.then(^(id response) {
        
}).catch(^(NSError *error) {
        
});

Author

Pircate, gao497868860@163.com

License

YYURLRequest is available under the MIT license. See the LICENSE file for more info.