Skip to content

Commit f3d8206

Browse files
authored
Merge pull request #74 from edusperoni/fix/hxr-httpformdata
fix: allow HttpFormData in NSHTTPXMLHttpRequest
2 parents af64560 + 76d567c commit f3d8206

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/angular/xhr.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import {XhrFactory } from "@angular/common/http";
22
import {Injectable} from "@angular/core";
33
import * as types from "@nativescript/core/utils/types";
4-
import { request } from "..";
4+
import { request, HTTPFormData } from "..";
55
import { HttpRequestOptions, HttpResponse, Trace } from "@nativescript/core";
66

77
namespace XMLHttpRequestResponseType {
@@ -261,7 +261,7 @@ export class NSHTTPXMLHttpRequest {
261261

262262
// @ts-ignore
263263
this._options.content = Blob.InternalAccessor.getBuffer(data);
264-
} else if (data instanceof ArrayBuffer) {
264+
} else if (data instanceof ArrayBuffer || data instanceof HTTPFormData) {
265265
this._options.content = data;
266266
}
267267

0 commit comments

Comments
 (0)