Merge pull request #26164 from ryanrhee/patch-1

node-fetch: Add URLSearchParams as valid body
This commit is contained in:
Benjamin Lichtman
2018-05-31 09:12:25 -07:00
committed by GitHub

View File

@@ -7,6 +7,7 @@
/// <reference types="node" />
import { Agent } from "http";
import { URLSearchParams } from "url";
export class Request extends Body {
constructor(input: string | { href: string } | Request, init?: RequestInit);
@@ -164,7 +165,7 @@ export interface ResponseInit {
}
export type HeaderInit = Headers | string[];
export type BodyInit = ArrayBuffer | ArrayBufferView | NodeJS.ReadableStream | string;
export type BodyInit = ArrayBuffer | ArrayBufferView | NodeJS.ReadableStream | string | URLSearchParams;
export type RequestInfo = string | Request;
export default function fetch(