Loading Data
Learn how to use Angular's HttpClient service to retrieve remote data into Ionic applications.
We'll cover the following...
Angular and HTTP methods
Angular’s HttpClient
service allows developers to perform asynchronous requests using the following methods (all of which return an Observable):
- The
request
method accepts any type of HTTP method, like,GET
,POST
, and so on. - The
get
method retrieves any information identified by the URI. - The
post
method is usually used to create a new resource, like posting data to be added to a remote database. - The
put
method is most often used to update existing resources, like posting data to update a current record in a remote database. - The
delete
method is generally used to remove an existing resource, such as removing a remote database record. - The
patch
method is used to make changes to a resource, not the complete resource itself. - The
head
method is identical to the HTTPGET
method except the server must not return a message-body in the response. - The
options
method requests information about available communication options when communicating with a specific resource.
The more seasoned developers will undoubtedly have noticed that these Angular ...