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
@@ -310,6 +310,19 @@ export function main() {
|
||||
});
|
||||
|
||||
|
||||
describe('.options()', () => {
|
||||
it('should perform an options request for given url',
|
||||
inject([AsyncTestCompleter], (async: AsyncTestCompleter) => {
|
||||
backend.connections.subscribe((c: MockConnection) => {
|
||||
expect(c.request.method).toBe(RequestMethod.Options);
|
||||
backend.resolveAllConnections();
|
||||
async.done();
|
||||
});
|
||||
http.options(url).subscribe((res: Response) => {});
|
||||
}));
|
||||
});
|
||||
|
||||
|
||||
describe('searchParams', () => {
|
||||
it('should append search params to url',
|
||||
inject([AsyncTestCompleter], (async: AsyncTestCompleter) => {
|
||||
|
||||
Reference in New Issue
Block a user