Skip to content

Commit

Permalink
Merge pull request #7 from josipbernat/develop
Browse files Browse the repository at this point in the history
Added timeout interval
  • Loading branch information
josipbernat committed Sep 30, 2014
2 parents 8c078c5 + 7bd2e86 commit 917f7ae
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 13 deletions.
6 changes: 3 additions & 3 deletions JBMessage.podspec
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
Pod::Spec.new do |s|
s.name = "JBMessage"
s.version = "1.0.13"
s.version = "1.0.14"
s.summary = "JBMessage is simple iOS networking wrapper based on AFNetworking"
s.homepage = "https://github.com/josipbernat/JBMessage"
s.license = { :type => "MIT", :file => "LICENSE" }
s.author = { "Josip Bernat" => "[email protected]" }
s.social_media_url = "http://twitter.com/josipbernat"
s.platform = :ios, "6.0"
s.source = { :git => "https://github.com/josipbernat/JBMessage.git", :tag => "v1.0.13" }
s.source = { :git => "https://github.com/josipbernat/JBMessage.git", :tag => "v1.0.14" }
s.source_files = 'JBMessage/JBMessage/**/*.{h,m}'
s.requires_arc = true
s.dependency "AFNetworking", "~> 2.3"
s.dependency "AFNetworking", "~> 2.4"
end

5 changes: 5 additions & 0 deletions JBMessage/JBMessage/JBMessage.h
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,11 @@ typedef void (^JBDownloadBlock)(NSUInteger bytesRead, long long totalBytesRead,
*/
@property (nonatomic, readwrite) JBRequestSerializerType requestSerializer;

/**
* Timeout interval of the message. Default is 60.0 seconds. Setting this property when message is in execution will have no effect.
*/
@property (nonatomic, readwrite) NSTimeInterval timeoutInterval;

#pragma mark - URL Registration

/**
Expand Down
3 changes: 3 additions & 0 deletions JBMessage/JBMessage/JBMessage.m
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ - (void)initialize {
_httpMethod = JBHTTPMethodPOST;
_responseSerializer = JBResponseSerializerTypeHTTP;
_shouldParseResponseOnMainQueue = YES;
_timeoutInterval = 60.0f;
}

#pragma mark - Background Task
Expand Down Expand Up @@ -474,6 +475,8 @@ - (NSMutableURLRequest *)urlRequest {

}

request.timeoutInterval = self.timeoutInterval;

return request;
}

Expand Down
2 changes: 1 addition & 1 deletion Podfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
platform :ios, '6.0'
pod 'AFNetworking', '~> 2.3'
pod 'AFNetworking', '~> 2.4'
18 changes: 9 additions & 9 deletions Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
PODS:
- AFNetworking (2.3.1):
- AFNetworking (2.4.1):
- AFNetworking/NSURLConnection
- AFNetworking/NSURLSession
- AFNetworking/Reachability
- AFNetworking/Security
- AFNetworking/Serialization
- AFNetworking/UIKit
- AFNetworking/NSURLConnection (2.3.1):
- AFNetworking/NSURLConnection (2.4.1):
- AFNetworking/Reachability
- AFNetworking/Security
- AFNetworking/Serialization
- AFNetworking/NSURLSession (2.3.1):
- AFNetworking/NSURLSession (2.4.1):
- AFNetworking/Reachability
- AFNetworking/Security
- AFNetworking/Serialization
- AFNetworking/Reachability (2.3.1)
- AFNetworking/Security (2.3.1)
- AFNetworking/Serialization (2.3.1)
- AFNetworking/UIKit (2.3.1):
- AFNetworking/Reachability (2.4.1)
- AFNetworking/Security (2.4.1)
- AFNetworking/Serialization (2.4.1)
- AFNetworking/UIKit (2.4.1):
- AFNetworking/NSURLConnection
- AFNetworking/NSURLSession

DEPENDENCIES:
- AFNetworking (~> 2.3)
- AFNetworking (~> 2.4)

SPEC CHECKSUMS:
AFNetworking: 6d7b76aa5d04c8c37daad3eef4b7e3f2a7620da3
AFNetworking: 0aabc6fae66d6e5d039eeb21c315843c7aae51ab

COCOAPODS: 0.33.1

0 comments on commit 917f7ae

Please sign in to comment.