I want to make a Get request to my Backend, but I want to verify some user credentials before sending the response object.
Here is my code:
$scope.ge
If you want to pass some data on using GET method you can pass a params options on the get method of the $http service. This will be urlencode parameters
$http.get(url, {
params: {
query: 'hello world'
}
}
or
$http({
url: url,
method:'GET',
params: {
query:'Hello World'
}
})
But, the http standars define the POST method to send data to the server. The GET is just to obtain data from it. On angular the post method:
$http({
url: url,
method:'POST',
data: {
query: 'Hello World'
}
})
check the official docs from GET and POST