Skip to content

Commit 0d06254

Browse files
committed
fix: better test for application/json
1 parent 1e913b3 commit 0d06254

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/https.ios.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ export function createRequest(
456456
opts.headers && opts.headers["Content-Type"]
457457
? <string>opts.headers["Content-Type"]
458458
: "application/json";
459-
if (type === "application/json") {
459+
if (type.startsWith("application/json")) {
460460
manager.requestSerializer = AFJSONRequestSerializer.serializer();
461461
manager.responseSerializer = AFJSONResponseSerializer.serializerWithReadingOptions(
462462
NSJSONReadingOptions.AllowFragments

0 commit comments

Comments
 (0)