jason328 jason328 - 1 year ago 218
AngularJS Question

What is the default transformResponse and transformRequest functions in $http

I'm wanting to serialize incoming and outgoing params. I've discovered I can do so by changing

default methods in
config. My question is this. What is the default code inside these two functions? For the life of me I can't find out where it's at. In order for me to successfully serialize the params, I need to know what the original functions looked like. I'm currently running Angular 1.5.X. Thanks.

.config(function ($httpProvider) {
$httpProvider.defaults.transformRequest = function(data){
// What is the default code here?

$httpProvider.defaults.transformResponse = function(data){
// What is the default code here?

Answer Source

Default transformRequest and transformResponse functions are defined in $http provider source code.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download