We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents e89e07e + 2111924 commit 5aa4115Copy full SHA for 5aa4115
src/https.ios.ts
@@ -157,10 +157,16 @@ export function request(opts: Https.HttpsRequestOptions): Promise<Https.HttpsRes
157
Object.keys(heads).forEach(key => manager.requestSerializer.setValueForHTTPHeaderField(heads[key] as any, key));
158
}
159
160
- let dict: NSMutableDictionary<string, any> = null;
+ let dict = null;
161
if (opts.body) {
162
let cont = opts.body;
163
- if (isObject(cont)) {
+ if (Array.isArray(cont)) {
164
+ dict = NSMutableArray.new();
165
+ cont.forEach(function (item, idx) {
166
+ dict.addObject(item);
167
+ });
168
+ }
169
+ else if (isObject(cont)) {
170
dict = NSMutableDictionary.new<string, any>();
171
Object.keys(cont).forEach(key => dict.setValueForKey(cont[key] as any, key));
172
0 commit comments