Tagged Questions
0
votes
2answers
83 views
Abort AngularJS $http request, deeply nested in multiple service calls
I'm using a deferred promise to abort a $http request (like explained in this post).
However, I'm unsure of how I should propagate the abort() function added at the root level. Everytime I call ...
0
votes
1answer
47 views
$filter is not a function AngularJS
app.controller('myController', ['$scope', '$http', '$filter', function($scope, $http, $filter) {
The above is an example of my code where I am trying to use $http.get and also $filter inside my ...
0
votes
1answer
59 views
How to get different controllers to use different configurations of $httpProvider in AngularJS?
I have a AngularJS project using the directory layout from angular-seed.
https://github.com/angular/angular-seed
app.js contains the configuration of my http provider. All my controllers have to use ...
1
vote
0answers
118 views
AngularJS 1.2 $http seems to cache POST requests when no data is passed
I'm having an issue with AngularJS 1.2 POST requests using $http service.
On a button click, I trigger a POST request like so:
$http.post('my/url').success(function(responseText) {
// Do ...
1
vote
3answers
141 views
With AngularJS, I don't want to set the global $http.defaults.headers.common. Can I send my custom header with each $resource call?
I'm calling a back-end server that I cannot control. Currently it's using jQuery ajax like this:
return $.ajax({
type: "POST",
url: "/api/cases/store",
contentType: "application/json",
...
2
votes
1answer
586 views
AngularJS API call error with $http GET
I'm trying to create a simple app using Angular that will consume my API. I'm using a VM to run the code, and I access it on my computer, so to call the API from my machine I can use cURL or any other ...
0
votes
0answers
163 views
Sending HTTP Post with multiple data through AngularJS
I am using AngularJS. I would like to send multiple data in a HTTP post through AngularJS. The backend runs Cakephp and I have verified that the Rest API works through python HTTP-post.
I have this ...
0
votes
1answer
45 views
AngularJS: Unexpected undefined in chained results
I've come across this issue before with nested directives, but I managed to find a workaround there. I have code that looks a bit like,
var token = API.callGeneric({}, {method: ...
0
votes
1answer
2k views
AngularJS can't send post request with Content-Type:application/json
Currently I am using angularJS and CoffeeScript to try to send a post request, and my sample code is:
login: (user, callback)=>
baseUrl = 'http://localhost:3000/api/v1/sessions'
@$http({
method: ...