Manos Chorianopoulos

fix request timeout at 30 sec

......@@ -7,7 +7,7 @@
<key>Pods-SwiftWarplyFramework.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
<integer>1</integer>
</dict>
</dict>
</dict>
......
......@@ -7,7 +7,7 @@
<key>SwiftWarplyFramework.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>1</integer>
<integer>0</integer>
</dict>
</dict>
</dict>
......
......@@ -3958,8 +3958,8 @@ CGFloat DistanceBetweenTwoPoints(CGPoint point1,CGPoint point2)
NSMutableString *urlString = [NSMutableString stringWithFormat:@"%@/oauth/%@/login", _baseURL, _appUUID];
WLLOG(@"[WARP Trace] HTTP URL: %@", urlString);
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:urlString] cachePolicy:NSURLRequestReloadIgnoringLocalCacheData timeoutInterval:30];
[request setTimeoutInterval:30];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:urlString] cachePolicy:NSURLRequestReloadIgnoringLocalCacheData timeoutInterval:30.0];
[request setTimeoutInterval:30.0];
NSDictionary *parameters;
......@@ -4050,6 +4050,7 @@ CGFloat DistanceBetweenTwoPoints(CGPoint point1,CGPoint point2)
_httpClient.responseSerializer = [AFJSONResponseSerializer serializer];
_httpClient.requestSerializer = [AFJSONRequestSerializer serializer];
[_httpClient.requestSerializer setTimeoutInterval:30];
//Set HTTP Headers
time_t timestamp = (time_t) [[NSDate date] timeIntervalSince1970];
......@@ -4086,8 +4087,8 @@ CGFloat DistanceBetweenTwoPoints(CGPoint point1,CGPoint point2)
NSMutableString *urlString = [NSMutableString stringWithFormat:@"%@/oauth/%@/web_authorize", _baseURL, _appUUID];
WLLOG(@"[WARP Trace] HTTP URL: %@", urlString);
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:urlString] cachePolicy:NSURLRequestReloadIgnoringLocalCacheData timeoutInterval:30];
[request setTimeoutInterval:30];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:urlString] cachePolicy:NSURLRequestReloadIgnoringLocalCacheData timeoutInterval:30.0];
[request setTimeoutInterval:30.0];
NSDictionary *parameters;
......@@ -4155,6 +4156,7 @@ CGFloat DistanceBetweenTwoPoints(CGPoint point1,CGPoint point2)
_httpClient.responseSerializer = [AFJSONResponseSerializer serializer];
_httpClient.requestSerializer = [AFJSONRequestSerializer serializer];
[_httpClient.requestSerializer setTimeoutInterval:30];
//Set HTTP Headers
time_t timestamp = (time_t) [[NSDate date] timeIntervalSince1970];
......@@ -4192,8 +4194,8 @@ CGFloat DistanceBetweenTwoPoints(CGPoint point1,CGPoint point2)
NSMutableString *urlString = [NSMutableString stringWithFormat:@"%@/oauth/%@/token", _baseURL, _appUUID];
WLLOG(@"[WARP Trace] HTTP URL: %@", urlString);
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:urlString] cachePolicy:NSURLRequestReloadIgnoringLocalCacheData timeoutInterval:30];
[request setTimeoutInterval:30];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:urlString] cachePolicy:NSURLRequestReloadIgnoringLocalCacheData timeoutInterval:30.0];
[request setTimeoutInterval:30.0];
NSDictionary *parameters;
......@@ -4264,6 +4266,7 @@ CGFloat DistanceBetweenTwoPoints(CGPoint point1,CGPoint point2)
_httpClient.responseSerializer = [AFJSONResponseSerializer serializer];
_httpClient.requestSerializer = [AFJSONRequestSerializer serializer];
[_httpClient.requestSerializer setTimeoutInterval:30];
//Set HTTP Headers
time_t timestamp = (time_t) [[NSDate date] timeIntervalSince1970];
......@@ -4299,8 +4302,8 @@ CGFloat DistanceBetweenTwoPoints(CGPoint point1,CGPoint point2)
NSMutableString *urlString = [NSMutableString stringWithFormat:@"%@/user/%@/register", _baseURL, _appUUID];
WLLOG(@"[WARP Trace] HTTP URL: %@", urlString);
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:urlString] cachePolicy:NSURLRequestReloadIgnoringLocalCacheData timeoutInterval:30];
[request setTimeoutInterval:30];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:urlString] cachePolicy:NSURLRequestReloadIgnoringLocalCacheData timeoutInterval:30.0];
[request setTimeoutInterval:30.0];
NSDictionary *parameters;
......@@ -4391,6 +4394,7 @@ CGFloat DistanceBetweenTwoPoints(CGPoint point1,CGPoint point2)
_httpClient.responseSerializer = [AFJSONResponseSerializer serializer];
_httpClient.requestSerializer = [AFJSONRequestSerializer serializer];
[_httpClient.requestSerializer setTimeoutInterval:30];
//Set HTTP Headers
time_t timestamp = (time_t) [[NSDate date] timeIntervalSince1970];
......@@ -4426,8 +4430,8 @@ CGFloat DistanceBetweenTwoPoints(CGPoint point1,CGPoint point2)
NSMutableString *urlString = [NSMutableString stringWithFormat:@"%@/user/%@/change_password", _baseURL, _appUUID];
WLLOG(@"[WARP Trace] HTTP URL: %@", urlString);
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:urlString] cachePolicy:NSURLRequestReloadIgnoringLocalCacheData timeoutInterval:30];
[request setTimeoutInterval:30];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:urlString] cachePolicy:NSURLRequestReloadIgnoringLocalCacheData timeoutInterval:30.0];
[request setTimeoutInterval:30.0];
NSDictionary *parameters;
......@@ -4518,6 +4522,7 @@ CGFloat DistanceBetweenTwoPoints(CGPoint point1,CGPoint point2)
_httpClient.responseSerializer = [AFJSONResponseSerializer serializer];
_httpClient.requestSerializer = [AFJSONRequestSerializer serializer];
[_httpClient.requestSerializer setTimeoutInterval:30];
//Set HTTP Headers
time_t timestamp = (time_t) [[NSDate date] timeIntervalSince1970];
......@@ -4561,8 +4566,8 @@ CGFloat DistanceBetweenTwoPoints(CGPoint point1,CGPoint point2)
NSMutableString *urlString = [NSMutableString stringWithFormat:@"%@/oauth/%@/context", _baseURL, _appUUID];
WLLOG(@"[WARP Trace] HTTP URL: %@", urlString);
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:urlString] cachePolicy:NSURLRequestReloadIgnoringLocalCacheData timeoutInterval:30];
[request setTimeoutInterval:30];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:urlString] cachePolicy:NSURLRequestReloadIgnoringLocalCacheData timeoutInterval:30.0];
[request setTimeoutInterval:30.0];
NSDictionary *parameters;
......@@ -4656,6 +4661,7 @@ CGFloat DistanceBetweenTwoPoints(CGPoint point1,CGPoint point2)
_httpClient.responseSerializer = [AFJSONResponseSerializer serializer];
_httpClient.requestSerializer = [AFJSONRequestSerializer serializer];
[_httpClient.requestSerializer setTimeoutInterval:30];
//Set HTTP Headers
time_t timestamp = (time_t) [[NSDate date] timeIntervalSince1970];
......@@ -4699,8 +4705,8 @@ CGFloat DistanceBetweenTwoPoints(CGPoint point1,CGPoint point2)
NSMutableString *urlString = [NSMutableString stringWithFormat:@"%@/api/%@/handle_image", _baseURL, _appUUID];
WLLOG(@"[WARP Trace] HTTP URL: %@", urlString);
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:urlString] cachePolicy:NSURLRequestReloadIgnoringLocalCacheData timeoutInterval:30];
[request setTimeoutInterval:30];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:urlString] cachePolicy:NSURLRequestReloadIgnoringLocalCacheData timeoutInterval:30.0];
[request setTimeoutInterval:30.0];
NSDictionary *parameters;
......@@ -4790,6 +4796,7 @@ CGFloat DistanceBetweenTwoPoints(CGPoint point1,CGPoint point2)
};
_httpClient.responseSerializer = [AFJSONResponseSerializer serializer];
_httpClient.requestSerializer = [AFJSONRequestSerializer serializer];
[_httpClient.requestSerializer setTimeoutInterval:30];
//Set HTTP Headers
time_t timestamp = (time_t) [[NSDate date] timeIntervalSince1970];
......@@ -4825,8 +4832,8 @@ CGFloat DistanceBetweenTwoPoints(CGPoint point1,CGPoint point2)
NSMutableString *urlString = [NSMutableString stringWithFormat:@"%@/user/%@/password_reset", _baseURL, _appUUID];
WLLOG(@"[WARP Trace] HTTP URL: %@", urlString);
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:urlString] cachePolicy:NSURLRequestReloadIgnoringLocalCacheData timeoutInterval:30];
[request setTimeoutInterval:30];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:urlString] cachePolicy:NSURLRequestReloadIgnoringLocalCacheData timeoutInterval:30.0];
[request setTimeoutInterval:30.0];
NSDictionary *parameters;
......@@ -4887,6 +4894,7 @@ CGFloat DistanceBetweenTwoPoints(CGPoint point1,CGPoint point2)
};
_httpClient.responseSerializer = [AFJSONResponseSerializer serializer];
_httpClient.requestSerializer = [AFJSONRequestSerializer serializer];
[_httpClient.requestSerializer setTimeoutInterval:30];
//Set HTTP Headers
time_t timestamp = (time_t) [[NSDate date] timeIntervalSince1970];
......@@ -4921,8 +4929,8 @@ CGFloat DistanceBetweenTwoPoints(CGPoint point1,CGPoint point2)
NSMutableString *urlString = [NSMutableString stringWithFormat:@"%@/user/%@/otp/generate", _baseURL, _appUUID];
WLLOG(@"[WARP Trace] HTTP URL: %@", urlString);
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:urlString] cachePolicy:NSURLRequestReloadIgnoringLocalCacheData timeoutInterval:30];
[request setTimeoutInterval:30];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:urlString] cachePolicy:NSURLRequestReloadIgnoringLocalCacheData timeoutInterval:30.0];
[request setTimeoutInterval:30.0];
NSDictionary *parameters;
......@@ -4983,6 +4991,7 @@ CGFloat DistanceBetweenTwoPoints(CGPoint point1,CGPoint point2)
};
_httpClient.responseSerializer = [AFJSONResponseSerializer serializer];
_httpClient.requestSerializer = [AFJSONRequestSerializer serializer];
[_httpClient.requestSerializer setTimeoutInterval:30];
//Set HTTP Headers
time_t timestamp = (time_t) [[NSDate date] timeIntervalSince1970];
......@@ -5109,8 +5118,8 @@ CGFloat DistanceBetweenTwoPoints(CGPoint point1,CGPoint point2)
NSMutableString *urlString = [NSMutableString stringWithFormat:@"%@%@", _baseURL, VERIFY_URL]; // /partners/cosmote/verify
WLLOG(@"[WARP Trace] HTTP URL: %@", urlString);
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:urlString] cachePolicy:NSURLRequestReloadIgnoringLocalCacheData timeoutInterval:30];
[request setTimeoutInterval:30];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:urlString] cachePolicy:NSURLRequestReloadIgnoringLocalCacheData timeoutInterval:30.0];
[request setTimeoutInterval:30.0];
NSDictionary *parameters;
......@@ -5172,6 +5181,7 @@ CGFloat DistanceBetweenTwoPoints(CGPoint point1,CGPoint point2)
// }
_httpClient.responseSerializer = [AFJSONResponseSerializer serializer];
_httpClient.requestSerializer = [AFJSONRequestSerializer serializer];
[_httpClient.requestSerializer setTimeoutInterval:30];
//Set HTTP Headers
time_t timestamp = (time_t) [[NSDate date] timeIntervalSince1970];
......@@ -5206,8 +5216,8 @@ CGFloat DistanceBetweenTwoPoints(CGPoint point1,CGPoint point2)
NSMutableString *urlString = [NSMutableString stringWithFormat:@"%@/partners/oauth/%@/token", _baseURL, _appUUID]; // /partners/cosmote/verify
WLLOG(@"[WARP Trace] HTTP URL: %@", urlString);
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:urlString] cachePolicy:NSURLRequestReloadIgnoringLocalCacheData timeoutInterval:30];
[request setTimeoutInterval:30];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:urlString] cachePolicy:NSURLRequestReloadIgnoringLocalCacheData timeoutInterval:30.0];
[request setTimeoutInterval:30.0];
NSDictionary *parameters;
......@@ -5269,6 +5279,7 @@ CGFloat DistanceBetweenTwoPoints(CGPoint point1,CGPoint point2)
// }
_httpClient.responseSerializer = [AFJSONResponseSerializer serializer];
_httpClient.requestSerializer = [AFJSONRequestSerializer serializer];
[_httpClient.requestSerializer setTimeoutInterval:30];
//Set HTTP Headers
// DEV: MWlTM0EyNjcxT2Q0a1B5QkIydEs1ZU5uRENhR0NWQjQ6MjI4MjA4ZTliMTQzNGQ2MmIxNGI3ZDAzYjM2ZjUwMzg=
......@@ -5316,8 +5327,8 @@ CGFloat DistanceBetweenTwoPoints(CGPoint point1,CGPoint point2)
WLLOG(@"[WARP Trace] HTTP URL: %@", urlString);
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:urlString] cachePolicy:NSURLRequestReloadIgnoringLocalCacheData timeoutInterval:30];
[request setTimeoutInterval:30];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:urlString] cachePolicy:NSURLRequestReloadIgnoringLocalCacheData timeoutInterval:30.0];
[request setTimeoutInterval:30.0];
NSDictionary *parameters;
......@@ -5408,6 +5419,7 @@ CGFloat DistanceBetweenTwoPoints(CGPoint point1,CGPoint point2)
_httpClient.responseSerializer = [AFJSONResponseSerializer serializer];
_httpClient.requestSerializer = [AFJSONRequestSerializer serializer];
[_httpClient.requestSerializer setTimeoutInterval:30];
//Set HTTP Headers
time_t timestamp = (time_t) [[NSDate date] timeIntervalSince1970];
......@@ -5445,8 +5457,8 @@ CGFloat DistanceBetweenTwoPoints(CGPoint point1,CGPoint point2)
WLLOG(@"[WARP Trace] HTTP URL: %@", urlString);
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:urlString] cachePolicy:NSURLRequestReloadIgnoringLocalCacheData timeoutInterval:30];
[request setTimeoutInterval:30];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:urlString] cachePolicy:NSURLRequestReloadIgnoringLocalCacheData timeoutInterval:30.0];
[request setTimeoutInterval:30.0];
NSDictionary *parameters;
......@@ -5537,6 +5549,7 @@ CGFloat DistanceBetweenTwoPoints(CGPoint point1,CGPoint point2)
_httpClient.responseSerializer = [AFJSONResponseSerializer serializer];
_httpClient.requestSerializer = [AFJSONRequestSerializer serializer];
[_httpClient.requestSerializer setTimeoutInterval:30];
//Set HTTP Headers
time_t timestamp = (time_t) [[NSDate date] timeIntervalSince1970];
......@@ -5573,8 +5586,8 @@ CGFloat DistanceBetweenTwoPoints(CGPoint point1,CGPoint point2)
WLLOG(@"[WARP Trace] HTTP URL: %@", urlString);
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:urlString] cachePolicy:NSURLRequestReloadIgnoringLocalCacheData timeoutInterval:30];
[request setTimeoutInterval:30];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:urlString] cachePolicy:NSURLRequestReloadIgnoringLocalCacheData timeoutInterval:30.0];
[request setTimeoutInterval:30.0];
NSDictionary *parameters;
......@@ -5665,6 +5678,7 @@ CGFloat DistanceBetweenTwoPoints(CGPoint point1,CGPoint point2)
_httpClient.responseSerializer = [AFJSONResponseSerializer serializer];
_httpClient.requestSerializer = [AFJSONRequestSerializer serializer];
[_httpClient.requestSerializer setTimeoutInterval:30];
//Set HTTP Headers
time_t timestamp = (time_t) [[NSDate date] timeIntervalSince1970];
......@@ -5709,8 +5723,8 @@ CGFloat DistanceBetweenTwoPoints(CGPoint point1,CGPoint point2)
WLLOG(@"[WARP Trace] HTTP URL: %@", urlString);
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:urlString] cachePolicy:NSURLRequestReloadIgnoringLocalCacheData timeoutInterval:30];
[request setTimeoutInterval:30];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:urlString] cachePolicy:NSURLRequestReloadIgnoringLocalCacheData timeoutInterval:30.0];
[request setTimeoutInterval:30.0];
NSDictionary *parameters;
......@@ -5766,6 +5780,7 @@ CGFloat DistanceBetweenTwoPoints(CGPoint point1,CGPoint point2)
_httpClient.responseSerializer = [AFJSONResponseSerializer serializer];
_httpClient.requestSerializer = [AFJSONRequestSerializer serializer];
[_httpClient.requestSerializer setTimeoutInterval:30];
//Set HTTP Headers
time_t timestamp = (time_t) [[NSDate date] timeIntervalSince1970];
......@@ -5804,7 +5819,7 @@ CGFloat DistanceBetweenTwoPoints(CGPoint point1,CGPoint point2)
_waitingForRegistration = YES;
NSString *urlString = [NSString stringWithFormat:@"%@/api/mobile/v2/%@/register/", _baseURL, _appUUID];
// NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:urlString] cachePolicy:NSURLRequestReloadIgnoringLocalCacheData timeoutInterval:30];
// NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:urlString] cachePolicy:NSURLRequestReloadIgnoringLocalCacheData timeoutInterval:30.0];
// [request setAllHTTPHeaderFields:@{@"Accept-Encoding": @"gzip",
// @"Accept": @"application/json",
// @"User-Agent": @"gzip",
......@@ -5885,6 +5900,7 @@ CGFloat DistanceBetweenTwoPoints(CGPoint point1,CGPoint point2)
_httpClient.responseSerializer = [AFJSONResponseSerializer serializer];
_httpClient.requestSerializer = [AFJSONRequestSerializer serializer];
[_httpClient.requestSerializer setTimeoutInterval:30];
// NSDictionary *context = [NSDictionary dictionaryWithObject:[[ASIdentifierManager sharedManager].advertisingIdentifier UUIDString] forKey:];
......@@ -5967,7 +5983,7 @@ CGFloat DistanceBetweenTwoPoints(CGPoint point1,CGPoint point2)
_waitingForRegistration = YES;
NSString *urlString = [NSString stringWithFormat:@"%@/api/mobile/v2/%@/register/", _baseURL, _appUUID];
// NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:urlString] cachePolicy:NSURLRequestReloadIgnoringLocalCacheData timeoutInterval:30];
// NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:urlString] cachePolicy:NSURLRequestReloadIgnoringLocalCacheData timeoutInterval:30.0];
// [request setAllHTTPHeaderFields:@{@"Accept-Encoding": @"gzip",
// @"Accept": @"application/json",
// @"User-Agent": @"gzip",
......@@ -6056,6 +6072,7 @@ CGFloat DistanceBetweenTwoPoints(CGPoint point1,CGPoint point2)
_httpClient.responseSerializer = [AFJSONResponseSerializer serializer];
_httpClient.requestSerializer = [AFJSONRequestSerializer serializer];
[_httpClient.requestSerializer setTimeoutInterval:30];
// NSDictionary *context = [NSDictionary dictionaryWithObject:[[ASIdentifierManager sharedManager].advertisingIdentifier UUIDString] forKey:];
......