Function
| Static Public Summary | ||
| public |
Creates an observable for an Ajax request with either a settings object with url, headers, etc or a string for a URL. |
|
Static Public
public ajax(settings: Object): Observable source
import ajax from 'json-api-store/src/ajax.js'Creates an observable for an Ajax request with either a settings object with url, headers, etc or a string for a URL.
Params:
| Name | Type | Attribute | Description |
| settings | Object | Can be one of the following: A string of the URL to make the Ajax call. An object with the following properties
|
Return:
| Observable | An observable sequence containing the XMLHttpRequest. |
Example:
source = ajax('/products');
source = ajax({ url: 'products', method: 'GET' });