export class Request
export class Request
exported from angular2/http defined in angular2/src/http/static_request.ts (line 11)
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.
Constructor
constructor(requestOptions: RequestArgs)
constructor(requestOptions: RequestArgs)
Not Yet Documented
Members
method : RequestMethod
method : RequestMethod
Http method with which to perform the request.
headers : Headers
headers : Headers
Headers
instance
url : string
url : string
Url of the remote resource
text() : String
text() : String
Returns the request's body as string, assuming that body exists. If body is undefined, return empty string.