{@link Headers} to be attached to a {@link Request}.
Http method with which to execute a {@link Request}. Acceptable methods are defined in the {@link RequestMethod} enum.
Search parameters to be included in a {@link Request}.
Url with which to perform a {@link Request}.
Enable use credentials for a {@link Request}.
Creates a copy of the RequestOptions
instance, using the optional input as values to override
existing values. This method will not change the values of the instance on which it is being
called.
Note that headers
and search
will override existing values completely if present in
the options
object. If these values should be merged, it should be done prior to calling
merge
on the RequestOptions
instance.
import {RequestOptions, Request, RequestMethod} from '@angular/http';
const options = new RequestOptions({
method: RequestMethod.Post
});
const req = new Request(options.merge({
url: 'https://google.com'
}));
console.log('req.method:', RequestMethod[req.method]); // Post
console.log('options.url:', options.url); // null
console.log('req.url:', req.url); // https://google.com
Generated using TypeDoc
Body to be used when creating a {@link Request}.