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.getEverything = function (){
$http.get('http://localhost:1234/things').success(function(data){
$scope.things = data;
});
};
I've tried the same code with the following syntax:
$http.method('path).then
$http.method(config)
And I just could not figure out how to pass in some data. Trying to use params:data as the config object with print out:
GET http://localhost:1234/[object%20Object] 404 (Not Found)
On the console.
The AngularJS Docs don't say a word about sending data with GET requests. I've also tried some answers of Stack, but most of then are outdated and just won't work.
Can I send data with GET request or this is just one design error of my application?