Abstract Private constructorStatic deleteFires an Http delete request against the supplied url upon
subscription.
The Http.Response type.
The url to Http delete.
An Observable of the Http.Response.
Fire an HTTP delete request against https://example.com:
import { Http } from '@sgrud/core';
Http.delete('https://example.com').subscribe(console.log);
Static getFires an Http get request against the supplied url upon
subscription.
The Http.Response type.
The url to Http get.
An Observable of the Http.Response.
Fire an HTTP GET request against https://example.com:
import { Http } from '@sgrud/core';
Http.get('https://example.com').subscribe(console.log);
Static headFires an Http head request against the supplied url upon
subscription.
The Http.Response type.
The url to Http head.
An Observable of the Http.Response.
Fire an HTTP head request against https://example.com:
import { Http } from '@sgrud/core';
Http.head('https://example.com').subscribe(console.log);
Static patchFires an Http patch request against the supplied url
containing the supplied body upon subscription.
The Http.Response type.
The url to Http patch.
The body of the Http.Request.
An Observable of the Http.Response.
Fire an HTTP patch request against https://example.com:
import { Http } from '@sgrud/core';
Http.patch('https://example.com', {
data: 'value'
}).subscribe(console.log);
Static postFires an Http post request against the supplied url
containing the supplied body upon subscription.
The Http.Response type.
The url to Http post.
The body of the Http.Request.
An Observable of the Http.Response.
Fire an HTTP post request against https://example.com:
import { Http } from '@sgrud/core';
Http.post('https://example.com', {
data: 'value'
}).subscribe(console.log);
Static putFires an Http put request against the supplied url containing
the supplied body upon subscription.
The Http.Response type.
The url to Http put.
The body of the Http.Request.
An Observable of the Http.Response.
Fire an HTTP put request against https://example.com:
import { Http } from '@sgrud/core';
Http.put('https://example.com', {
data: 'value'
}).subscribe(console.log);
Static requestFires a custom Http.Request. Use this method for more fine-grained control over the outgoing Http.Request.
The Http.Response type.
The Http.Request to be requested.
An Observable of the Http.Response.
Fire an HTTP custom request against https://example.com:
import { Http } from '@sgrud/core';
Http.request({
method: 'GET',
url: 'https://example.com',
headers: { 'x-example': 'value' }
}).subscribe(console.log);
Generic handle method, enforced by the Http.Handler interface.
Main method of the this class. Internally pipes the request through all
linked classes extending Proxy.
The type of the handled Http.Response.
The Http.Request to be handled.
An Observable of the Http.Response.
Generated using TypeDoc
The abstract Http class is a thin wrapper around the ajax method. The main function of this wrapper is to pipe all requests through a chain of classes extending the abstract Proxy class. Thereby interceptors for various requests can be implemented to, e.g., provide API credentials etc.
See
Proxy