Skip to content

Commit e6437a5

Browse files
author
Bruce A. Grobler
committed
disable json parsing android
1 parent bbea069 commit e6437a5

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

https.android.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,12 +195,14 @@ export function request(opts: Https.HttpsRequestOptions): Promise<Https.HttpsRes
195195
} else {
196196
let type = <string>opts.headers['Content-Type'] || 'application/json';
197197
let body = <any>opts.body || {};
198+
198199
try {
199-
body = JSON.stringify(body)
200+
// body = JSON.stringify(body)
200201
} catch (e) {
201202
}
203+
202204
request[methods[opts.method]](okhttp3.RequestBody.create(
203-
okhttp3.MediaType.parse("text/plain"),
205+
okhttp3.MediaType.parse(type),
204206
body
205207
))
206208
}

https.ios.js

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

https.ios.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ export function request(options: Https.HttpsRequestOptions): Promise<Https.Https
114114
send.headers[k] = v
115115
})
116116
}
117+
117118
if (AFResponse.reason) {
118119
send.reason = AFResponse.reason
119120
}

0 commit comments

Comments
 (0)