I used protractor e2e test in my angularjs application using mock
$httpBackend. I have problem with POST request, when i am trying to
returning mock data(JSON object) for response, the post data in the
header body will actually returned,
EX:
* var mockData = {};
$httpBackend.whenPOST('url').respond(function(method, url, data, headers)
{ return authenticated ? [200, mockData, {}] : [401, {}, {}]; });*
- In this case the mockData is not retuned, when the the $httpBackend
intercepts actual request. Instead of mockData I received the 'data' in the
header body.
- But in GET request the mock data response will returned correctly.
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.