Skip to content

Commit

Permalink
Bugfix/hw 67913 increase response wait time (#98)
Browse files Browse the repository at this point in the history
* increased API response timeout
  • Loading branch information
jsaini-hw authored Sep 29, 2020
1 parent 480ac91 commit c7ec0c0
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 6 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
Changelog
=========

[1.0.0-beta09](https://github.com/hyperwallet/hyperwallet-ios-sdk/releases/tag/1.0.0-beta09)
-------------------
- Increased API response timeout

[1.0.0-beta08](https://github.com/hyperwallet/hyperwallet-ios-sdk/releases/tag/1.0.0-beta08)
-------------------
- Fixed Cocoapod issue
Expand Down
2 changes: 1 addition & 1 deletion HyperwalletSDK.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |spec|
spec.name = 'HyperwalletSDK'
spec.version = '1.0.0-beta08'
spec.version = '1.0.0-beta09'
spec.summary = 'Hyperwallet Core SDK for iOS to integrate with Hyperwallet Platform'
spec.homepage = 'https://github.com/hyperwallet/hyperwallet-ios-sdk'
spec.license = { :type => 'MIT', :file => 'LICENSE' }
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ Use [Carthage](https://github.com/Carthage/Carthage) or [CocoaPods](https://coco
### Carthage
Specify it in your Cartfile:
```ogdl
github "hyperwallet/hyperwallet-ios-sdk" "1.0.0-beta08"
github "hyperwallet/hyperwallet-ios-sdk" "1.0.0-beta09"
```

### CocoaPods
Specify it in your Podfile:
```ruby
pod 'HyperwalletSDK', '~> 1.0.0-beta08'
pod 'HyperwalletSDK', '~> 1.0.0-beta09'
```

## Initialization
Expand Down
4 changes: 2 additions & 2 deletions Sources/HTTPTransaction.swift
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ final class HTTPTransaction {
_ error: HyperwalletErrorType?) -> Void)
-> (GraphQlResult<Response>?, HyperwalletErrorType?) -> Void
where Response: Decodable {
return { (result, error) in
{ (result, error) in
if let error = error {
completionHandler(nil, error)
}
Expand Down Expand Up @@ -269,7 +269,7 @@ final class HTTPTransaction {

/// Returns the default timeout - 5 seconds
private static let defaultTimeout: Double = {
5.0
10.0
}()

/// Returns `Accept-Language` header, generated by querying `Locale` for the user's `preferredLanguages`.
Expand Down
2 changes: 1 addition & 1 deletion Tests/HTTPTransactionTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class HTTPTransactionTests: XCTestCase {
let configuration = HTTPTransaction.urlSessionConfiguration
let header = configuration.httpAdditionalHeaders

XCTAssertEqual(configuration.timeoutIntervalForRequest, 5.0)
XCTAssertEqual(configuration.timeoutIntervalForRequest, 10.0)
XCTAssertEqual(header?["Content-Type"] as? String, "application/json")
XCTAssertTrue((header?["Accept-Language"] as? String ?? "").contains("en"))
let userAgent = header?["User-Agent"] as? String
Expand Down

0 comments on commit c7ec0c0

Please sign in to comment.