$http.get('/someUrl').
URL = 'api/controler/action?parameter1=xxx¶meter2=xxx'
- In the case of a webapi2, it depends on the type of server you are consuming.
$http.post('/someUrl', {msg:'hello word!'}).
then(function(response) {
// this callback will be called asynchronously
// when the response is available
}, function(response) {
// called asynchronously if an error occurs
// or server returns response with an error status.
});
The response object has these properties:
data - {string | Object} - The response body transformed with the transform functions.
Status - {number} - HTTP status code of the
response. headers - {function ([headerName])} - Header getter function.
config - {Object} - The configuration object that was used to generate
the request. statusText - {string} - HTTP status text of the response.