Skip to content

Commit efecf79

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

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/https.ios.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,7 @@ 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-
141-
let contentType = (<string>opts.headers['Content-Type']).substring(0, 16);
140+
const contentType = (<string>opts.headers['Content-Type']).substring(0, 16);
142141
if (opts.headers && contentType === 'application/json') {
143142
manager.requestSerializer = AFJSONRequestSerializer.serializer();
144143
manager.responseSerializer = AFJSONResponseSerializer.serializerWithReadingOptions(NSJSONReadingOptions.AllowFragments);

0 commit comments

Comments
 (0)