Skip to content

Commit 1961e5e

Browse files
authored
Update https.ios.ts
1 parent aa1a00f commit 1961e5e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/https.ios.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,8 @@ export function request(opts: Https.HttpsRequestOptions): Promise<Https.HttpsRes
137137
return new Promise((resolve, reject) => {
138138
try {
139139
const manager = AFHTTPSessionManager.alloc().initWithBaseURL(NSURL.URLWithString(opts.url));
140-
let contentType = opts.headers['Content-Type'].substring(0, 16);
140+
141+
let contentType = (<string>opts.headers['Content-Type']).substring(0, 16);
141142
if (opts.headers && contentType === 'application/json') {
142143
manager.requestSerializer = AFJSONRequestSerializer.serializer();
143144
manager.responseSerializer = AFJSONResponseSerializer.serializerWithReadingOptions(NSJSONReadingOptions.AllowFragments);

0 commit comments

Comments
 (0)