Multiple headers with the same fixed

This commit is contained in:
Vladimir Enchev
2016-03-07 15:28:27 +02:00
parent 3ce5df039b
commit c9c703cc3c
5 changed files with 45 additions and 6 deletions

View File

@@ -58,7 +58,7 @@ function onRequestComplete(requestId: number, result: com.tns.Async.Http.Request
}
// read the headers
var headers = {};
var headers: http.Headers = {};
if (result.headers) {
var jHeaders = result.headers;
var length = jHeaders.size();
@@ -66,7 +66,8 @@ function onRequestComplete(requestId: number, result: com.tns.Async.Http.Request
var pair: com.tns.Async.Http.KeyValuePair;
for (i = 0; i < length; i++) {
pair = jHeaders.get(i);
headers[pair.key] = pair.value;
(<any>http).addHeader(headers, pair.key, pair.value);
}
}