aboutsummaryrefslogtreecommitdiffstats
path: root/src/ng/http.js
AgeCommit message (Collapse)Author
2012-11-26fix($http): only set X-XSFR-TOKEN header for same-domain requestRado Kirov
This is needed to prevent CORS preflight checks. The XSFR token is quite useless for CORS requests anyway. BREAKING CHANGE: X-XSFR-TOKEN is no longer send for cross domain requests. This shouldn't affect any known production service. Closes #1096
2012-11-26fix($http): remove 'X-Requested-With' from header defaultsRado Kirov
X-Requested-With header is rarely used in practice and by using it all the time we are triggering preflight checks for crossdomain requests. We could try detecting if we are doing CORS requests or not, but it doesn't look like it's worth the trouble. BREAKING CHANGE: X-Requested-With header is not set by $http service any more. If anyone actually uses this header it's quite easy to add it back via: ``` myAppModule.config(['$httpProvider', function($httpProvider) { $httpProvider.defaults.headers.common["X-Requested-With"] = 'XMLHttpRequest'; }]); ``` Closes #1004
2012-11-24fix($http): config.param should expand array values properlyTom Davis
Today, calling e.g. $http(url, { params: { a: [1,2,3] } }) results in a query string like "?a=%5B1%2C2%2C3%5D" which is undesirable. This commit enhances buildURL to createa query string like "?a=1&a=2&a=3". BREAKING CHANGE: if the server relied on the buggy behavior then either the backend should be fixed or a simple serialization of the array should be done on the client before calling the $http service. Closes #1363
2012-09-11feat($http): Allow setting withCredentials on defaultsTom Hughes
Closes #1095.
2012-08-10feat($http): support reponseTypeVojta Jina
Closes #1013
2012-06-12docs(*): simplify doc urlsIgor Minar
we now have two types of namespaces: - true namespace: angular.* - used for all global apis - virtual namespace: ng.*, ngMock.*, ... - used for all DI modules the virual namespaces have services under the second namespace level (e.g. ng.) and filters and directives prefixed with filter: and directive: respectively (e.g. ng.filter:orderBy, ng.directive:ngRepeat) this simplifies urls and makes them a lot shorter while still avoiding name collisions
2012-06-08fix($http): add utf-8 to default Content-Type header (post/put)Vojta Jina
This fixes special characters issue with MongoLab. https://groups.google.com/d/topic/angular/1T6h7bfZ7Rs/discussion
2012-05-04chore(docs): re-skin main documentationMisko Hevery
2012-04-11docs($http): fix return typesIgor Minar
2012-04-11feat($http): expose the defaults config as $http.defaultsIgor Minar
Often it is impossible to set the http defaults during the config phase, because the config info is not available at this time. A good example is authentication - often the app needs to bootstrap, allow user to enter credentials and only then it gains access to session token which then should be sent to the server with every request. Without having the ability to set the defaults at runtime, the developer either has to resort to hacks, or has to set the session token header with every request made by the app.
2012-04-04feat($http): add withCredentials config optionVojta Jina
2012-03-28feat($http): make the transform defaults to an arrayIgor Minar
$httpProvider.defaults.transformRequest and $httpProvider.defaults.transformResponse are now arrays containing single function. This makes it easy to add an extra transform fn. adding an extra fn before had to be done in this cluncky way: $httpProvider.defaults.transformResponse = [$httpProvider.defaults.transformResponse, myTransformFn]; after this change, it's simply: $httpProvider.defaults.transformResponse.push(myTransformFn);
2012-03-28style($http): remove redundant 'use strict' headerIgor Minar
2012-03-28chore(Rakefile): get ready for modulesMisko Hevery
2012-03-28chore(module): move files around in preparation for more modulesMisko Hevery