Probably a very basic question, but I cannot seem to find a simple answer.
I have a GET method leveraging Angular\'s $http
that is requesting a promise
Answer vs Good Solution
HTTP POST is preferred while sending data to the server.
HTTP GET method means querying for data, not sending data. Because of that, an HTTP request with GET method will always have request.body empty. But still data can be sent to server via GET using query string. In your case:
Client
$http.get('url_to_be_hit', { name : 'Mr. X'})
.success(function(res){ //response })
.error(function(err){ //failure });
Server
app.get('/url_to_be_hit', function(req,res,next){
//req.query.name
});
Happy Helping!