feat(http): add options method to Http (#10540)
Add options method to the Http object, which could be useful when using self-describing RESTful APIs. This closes #10500, closes #7918
This commit is contained in:

committed by
Alex Rickabaugh

parent
46bbcefb36
commit
0bd97ecda2
@ -186,6 +186,15 @@ export class Http {
|
||||
this._backend,
|
||||
new Request(mergeOptions(this._defaultOptions, options, RequestMethod.Head, url)));
|
||||
}
|
||||
|
||||
/**
|
||||
* Performs a request with `options` http method.
|
||||
*/
|
||||
options(url: string, options?: RequestOptionsArgs): Observable<Response> {
|
||||
return httpRequest(
|
||||
this._backend,
|
||||
new Request(mergeOptions(this._defaultOptions, options, RequestMethod.Options, url)));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user