ajaxCold
Last updated
Was this helpful?
Last updated
Was this helpful?
[Ⓣ][1]
Creates a cold observable for an Ajax request with either a settings object with url, headers, etc or a string for a URL.
url
(String): A string of the URL to make the Ajax call.
settings
(Object): An object with the following properties
url
(String): URL of the request
method
(String): Method of the request, such as GET, POST, PUT, PATCH, DELETE
async
(Boolean): Whether the request is async
headers
(Object): Optional headers
(Observable): An observable sequence containing the XMLHttpRequest
.
The following example uses a simple URL to retrieve a list of products.