$http service enables you to directly interact with the webserver from your AngularJS code. The
$http service uses the browser’s
XMLHttpRequest object underneath, but from the context of the AngularJS framework.
There are two ways to use the
$http service. The simplest is to use one of the following built-in shortcut methods that correspond to standard HTTP requests:
post(url, data, [config])