javascript - Restangular - PUT request payload is being sent as query string parameters -


i'm using rectangular , have this:

stuffresource = parentresource           .one(resources.category, $scope.stuff.category)           .one(resources.stuff, $scope.stuff.id)           .put($scope.stuff); 

now, when request sent, "stuff" object being sent in query string instead of body!

what i'm doing wrong here?

what want here use customput() instead of normal put().

stuffresource = parentresource     .one(resources.category, $scope.stuff.category)     .one(resources.stuff, $scope.stuff.id)     .customput($scope.stuff); 

from docs

  • put([queryparams, headers]): put current element

  • customput([elem, path, params, headers]): put specific path. optionally can set params , headers , elem. elem element post. if it's not set, it's assumed it's element you're calling function.


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -