-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
是 撒
committed
May 21, 2015
1 parent
1d0c3d4
commit e9016e2
Showing
510 changed files
with
50,491 additions
and
104 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<array> | ||
<dict> | ||
<key>hot_city</key> | ||
<string>北京</string> | ||
</dict> | ||
<dict> | ||
<key>hot_city</key> | ||
<string>成都</string> | ||
</dict> | ||
<dict> | ||
<key>hot_city</key> | ||
<string>大连</string> | ||
</dict> | ||
<dict> | ||
<key>hot_city</key> | ||
<string>重庆</string> | ||
</dict> | ||
<dict> | ||
<key>hot_city</key> | ||
<string>佛山</string> | ||
</dict> | ||
<dict> | ||
<key>hot_city</key> | ||
<string>大庆</string> | ||
</dict> | ||
<dict> | ||
<key>hot_city</key> | ||
<string>长沙</string> | ||
</dict> | ||
<dict> | ||
<key>hot_city</key> | ||
<string>福州</string> | ||
</dict> | ||
<dict> | ||
<key>hot_city</key> | ||
<string>长春</string> | ||
</dict> | ||
</array> | ||
</plist> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
highlight-color: "#F89915" | ||
highlight-dark-color: "#E23B1B" | ||
darker-color: "#D8A688" | ||
darker-dark-color: "#E93D1C" | ||
background-color: "#E9DFDB" | ||
alt-link-color: "#E23B1B" | ||
warning-color: "#E23B1B" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Xcode | ||
.DS_Store | ||
build/ | ||
*.pbxuser | ||
!default.pbxuser | ||
*.mode1v3 | ||
!default.mode1v3 | ||
*.mode2v3 | ||
!default.mode2v3 | ||
*.perspectivev3 | ||
!default.perspectivev3 | ||
*.xcworkspace | ||
!default.xcworkspace | ||
xcuserdata | ||
profile | ||
*.moved-aside | ||
DerivedData | ||
.idea/ | ||
Tests/Pods | ||
Tests/Podfile.lock | ||
Tests/AFNetworking Tests.xcodeproj/xcshareddata/xcschemes/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
language: objective-c | ||
before_install: | ||
- gem install cocoapods --no-rdoc --no-ri --no-document --quiet | ||
- gem install xcpretty --no-rdoc --no-ri --no-document --quiet | ||
- cd Tests && pod install && cd $TRAVIS_BUILD_DIR | ||
script: rake test | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
Pod::Spec.new do |s| | ||
s.name = 'AFNetworking' | ||
s.version = '2.5.3' | ||
s.license = 'MIT' | ||
s.summary = 'A delightful iOS and OS X networking framework.' | ||
s.homepage = 'https://github.com/AFNetworking/AFNetworking' | ||
s.social_media_url = 'https://twitter.com/AFNetworking' | ||
s.authors = { 'Mattt Thompson' => '[email protected]' } | ||
s.source = { :git => 'https://github.com/AFNetworking/AFNetworking.git', :tag => s.version, :submodules => true } | ||
s.requires_arc = true | ||
|
||
s.ios.deployment_target = '6.0' | ||
s.osx.deployment_target = '10.8' | ||
|
||
s.public_header_files = 'AFNetworking/*.h' | ||
s.source_files = 'AFNetworking/AFNetworking.h' | ||
|
||
s.subspec 'Serialization' do |ss| | ||
ss.source_files = 'AFNetworking/AFURL{Request,Response}Serialization.{h,m}' | ||
ss.ios.frameworks = 'MobileCoreServices', 'CoreGraphics' | ||
ss.osx.frameworks = 'CoreServices' | ||
end | ||
|
||
s.subspec 'Security' do |ss| | ||
ss.source_files = 'AFNetworking/AFSecurityPolicy.{h,m}' | ||
ss.frameworks = 'Security' | ||
end | ||
|
||
s.subspec 'Reachability' do |ss| | ||
ss.source_files = 'AFNetworking/AFNetworkReachabilityManager.{h,m}' | ||
ss.frameworks = 'SystemConfiguration' | ||
end | ||
|
||
s.subspec 'NSURLConnection' do |ss| | ||
ss.dependency 'AFNetworking/Serialization' | ||
ss.dependency 'AFNetworking/Reachability' | ||
ss.dependency 'AFNetworking/Security' | ||
|
||
ss.source_files = 'AFNetworking/AFURLConnectionOperation.{h,m}', 'AFNetworking/AFHTTPRequestOperation.{h,m}', 'AFNetworking/AFHTTPRequestOperationManager.{h,m}' | ||
end | ||
|
||
s.subspec 'NSURLSession' do |ss| | ||
ss.dependency 'AFNetworking/Serialization' | ||
ss.dependency 'AFNetworking/Reachability' | ||
ss.dependency 'AFNetworking/Security' | ||
|
||
ss.source_files = 'AFNetworking/AFURLSessionManager.{h,m}', 'AFNetworking/AFHTTPSessionManager.{h,m}' | ||
end | ||
|
||
s.subspec 'UIKit' do |ss| | ||
ss.ios.deployment_target = '6.0' | ||
|
||
ss.dependency 'AFNetworking/NSURLConnection' | ||
ss.dependency 'AFNetworking/NSURLSession' | ||
|
||
ss.ios.public_header_files = 'UIKit+AFNetworking/*.h' | ||
ss.ios.source_files = 'UIKit+AFNetworking' | ||
ss.osx.source_files = '' | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
// AFHTTPRequestOperation.h | ||
// Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/) | ||
// | ||
// Permission is hereby granted, free of charge, to any person obtaining a copy | ||
// of this software and associated documentation files (the "Software"), to deal | ||
// in the Software without restriction, including without limitation the rights | ||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
// copies of the Software, and to permit persons to whom the Software is | ||
// furnished to do so, subject to the following conditions: | ||
// | ||
// The above copyright notice and this permission notice shall be included in | ||
// all copies or substantial portions of the Software. | ||
// | ||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
// THE SOFTWARE. | ||
|
||
#import <Foundation/Foundation.h> | ||
#import "AFURLConnectionOperation.h" | ||
|
||
/** | ||
`AFHTTPRequestOperation` is a subclass of `AFURLConnectionOperation` for requests using the HTTP or HTTPS protocols. It encapsulates the concept of acceptable status codes and content types, which determine the success or failure of a request. | ||
*/ | ||
@interface AFHTTPRequestOperation : AFURLConnectionOperation | ||
|
||
///------------------------------------------------ | ||
/// @name Getting HTTP URL Connection Information | ||
///------------------------------------------------ | ||
|
||
/** | ||
The last HTTP response received by the operation's connection. | ||
*/ | ||
@property (readonly, nonatomic, strong) NSHTTPURLResponse *response; | ||
|
||
/** | ||
Responses sent from the server in data tasks created with `dataTaskWithRequest:success:failure:` and run using the `GET` / `POST` / et al. convenience methods are automatically validated and serialized by the response serializer. By default, this property is set to an AFHTTPResponse serializer, which uses the raw data as its response object. The serializer validates the status code to be in the `2XX` range, denoting success. If the response serializer generates an error in `-responseObjectForResponse:data:error:`, the `failure` callback of the session task or request operation will be executed; otherwise, the `success` callback will be executed. | ||
@warning `responseSerializer` must not be `nil`. Setting a response serializer will clear out any cached value | ||
*/ | ||
@property (nonatomic, strong) AFHTTPResponseSerializer <AFURLResponseSerialization> * responseSerializer; | ||
|
||
/** | ||
An object constructed by the `responseSerializer` from the response and response data. Returns `nil` unless the operation `isFinished`, has a `response`, and has `responseData` with non-zero content length. If an error occurs during serialization, `nil` will be returned, and the `error` property will be populated with the serialization error. | ||
*/ | ||
@property (readonly, nonatomic, strong) id responseObject; | ||
|
||
///----------------------------------------------------------- | ||
/// @name Setting Completion Block Success / Failure Callbacks | ||
///----------------------------------------------------------- | ||
|
||
/** | ||
Sets the `completionBlock` property with a block that executes either the specified success or failure block, depending on the state of the request on completion. If `error` returns a value, which can be caused by an unacceptable status code or content type, then `failure` is executed. Otherwise, `success` is executed. | ||
This method should be overridden in subclasses in order to specify the response object passed into the success block. | ||
@param success The block to be executed on the completion of a successful request. This block has no return value and takes two arguments: the receiver operation and the object constructed from the response data of the request. | ||
@param failure The block to be executed on the completion of an unsuccessful request. This block has no return value and takes two arguments: the receiver operation and the error that occurred during the request. | ||
*/ | ||
- (void)setCompletionBlockWithSuccess:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success | ||
failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure; | ||
|
||
@end |
Oops, something went wrong.