Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pircate/yyurlrequest
A Objective-C network library based on AFNetworking/YYModel/YYCache.
https://github.com/pircate/yyurlrequest
network yycache yymodel
Last synced: 26 days ago
JSON representation
A Objective-C network library based on AFNetworking/YYModel/YYCache.
- Host: GitHub
- URL: https://github.com/pircate/yyurlrequest
- Owner: Pircate
- License: mit
- Created: 2018-04-19T07:20:42.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-10-18T02:50:35.000Z (about 6 years ago)
- Last Synced: 2023-09-17T16:09:37.994Z (over 1 year ago)
- Topics: network, yycache, yymodel
- Language: Objective-C
- Homepage:
- Size: 266 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# YYURLRequest
[![CI Status](http://img.shields.io/travis/Pircate/YYURLRequest.svg?style=flat)](https://travis-ci.org/Pircate/YYURLRequest)
[![Version](https://img.shields.io/cocoapods/v/YYURLRequest.svg?style=flat)](http://cocoapods.org/pods/YYURLRequest)
[![License](https://img.shields.io/cocoapods/l/YYURLRequest.svg?style=flat)](http://cocoapods.org/pods/YYURLRequest)
[![Platform](https://img.shields.io/cocoapods/p/YYURLRequest.svg?style=flat)](http://cocoapods.org/pods/YYURLRequest)## 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](http://cocoapods.org) or [Carthage](https://github.com/Carthage/Carthage). To install
it, simply add the following line to your Podfile or Cartfile:### CocoaPods
```ruby
pod 'YYURLRequest'
```### Carthage
```ruby
github "Pircate/YYURLRequest"
```## Usage
### Import
``` objc
#import
```### Request with cache
``` objc
YYURLRequest *request = [YYURLRequest requestWithBaseURL:[NSURL URLWithString:@""] path:@"" parameters:@{}];
request.cache(^(id response) {
}).then(^(id response) {
}).catch(^(NSError *error) {
});
```### Request without cache
``` objc
request.then(^(id response) {
}).catch(^(NSError *error) {
});
```## Author
Pircate, [email protected]
## License
YYURLRequest is available under the MIT license. See the LICENSE file for more info.