Requestlink
Creates Request
instances from provided values.
弃用说明
说明
The Request's interface is inspired by the Request constructor defined in the Fetch Spec, but is considered a static value whose body can be accessed many times. There are other differences in the implementation, but this is the most significant.
Request
instances are typically created by higher-level classes, like Http
and Jsonp
, but it may occasionally be useful to explicitly create Request
instances. One such example is when creating services that wrap higher-level services, like Http
, where it may be useful to generate a Request
with arbitrary headers and search params.
构造函数
参数
|
属性
属性名 | 类型 | 说明 |
---|---|---|
method | Http method with which to perform the request. | |
headers | Headers instance | |
url | Url of the remote resource | |
withCredentials | Enable use credentials | |
responseType | Buffer to store the response |
方法
Returns the content type enum based on header options. |
参数没有参数。 返回值
|
Returns the content type of request's body based on its type. |
参数没有参数。 返回值
|
Returns the request's body according to its type. If body is undefined, return null. |
参数没有参数。 返回值
|