The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
0answers
4 views

Requesting Example for angular.js $http (or $resource) POST and transformRequest as a service

Using angular 1.1.5 and needing to pass urlencoded data to the backend. I've gotten this to work with solution from here: How can I make angular.js post data as form data instead of a request payload? ...
0
votes
1answer
53 views

AngularJS $http request in provider function

I'm trying to implement client-side authentication with AngularJS. Right now I'm injecting the access-levels for each route as a factory into the config function of my app. Here is my code: shop = ...
2
votes
1answer
272 views

Why AngularJS sends X-XSRF-TOKEN header as JSON string?

Angular sets the X-XSRF-TOKEN header to the value of the XSRF-TOKEN cookie: var xsrfValue = isSameDomain(config.url, $browser.url()) ? $browser.cookies()[config.xsrfCookieName || ...
18
votes
1answer
4k views

AngularJs ReferenceError: $http is not defined

I have the following angular function $scope.updateStatus = function(user){ $http({ url: user.update_path, method: "POST", data: {user_id: user.id, draft: true} }); }; But whenever ...
17
votes
5answers
13k views

AngularJS - Processing $http response in service

I recently posted a detailed description of the issue I am facing here at SO. As I couldn't send an actual $http request, I used timeout to simulate asynchronous behavior. Data binding from my model ...
19
votes
1answer
20k views

from jquery $.ajax to angular $http

I have this piece of jQuery code that works fine cross origin: jQuery.ajax({ url: "http://example.appspot.com/rest/app", type: "POST", data: JSON.stringify({"foo":"bar"}), dataType: ...
43
votes
5answers
24k views

How can I make angular.js post data as form data instead of a request payload?

In the code below, the angular.js $http method calls the url, and submits the xsrf object as a "Request Payload" (as described in the Chrome debugger network tab). The jQuery $.ajax method does the ...