Skip to content

Commit e96fb4a

Browse files
author
Bruce A. Grobler
committed
Try text plain media type for android, (stop double serializing)
1 parent f680155 commit e96fb4a

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

https.android.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ export function request(opts: Https.HttpsRequestOptions): Promise<Https.HttpsRes
200200
} catch (e) {
201201
}
202202
request[methods[opts.method]](okhttp3.RequestBody.create(
203-
okhttp3.MediaType.parse(type),
203+
okhttp3.MediaType.parse("text/plain"),
204204
body
205205
))
206206
}

https.ios.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ function AFFailure(resolve, reject, task: NSURLSessionDataTask, error: NSError)
143143
resolve({task, content, reason})
144144
} else {
145145
console.log("nativescript-https: (AFFailure) No Error Available...", error);
146+
resolve({task});
146147
}
147148
}
148149

0 commit comments

Comments
 (0)