3

I am wondering why in AngularJS 2 (2.0.0-beta.13) the HTTP Post method only accepts string data as body and not a JavaScript object as is the case in AngularJS 1.

AngularJS-1:

$http.post(someUrl,someObject)

AngularJS-2:

http.post(someUrl, JSON.stringify(someObject))

Thanks

1 Answer 1

4

Because support for other types is not yet implemented https://github.com/angular/http/issues/75

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.