Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

http.post is not sending request #76

Open
reachlakstar opened this issue Aug 30, 2016 · 3 comments
Open

http.post is not sending request #76

reachlakstar opened this issue Aug 30, 2016 · 3 comments

Comments

@reachlakstar
Copy link

Http.post initiated but no response, not sure what is happening. but it works fine with fetch command.

@marclaval
Copy link
Contributor

I don't think I've ever tried to use POST in this project.
Can you please post your code snippet of using http.post?

@reachlakstar
Copy link
Author

let body = JSON.stringify({ name });
let headers = new Headers({ 'Content-Type': 'application/json' });
let options = new RequestOptions({ headers: headers });

return this.http.post(this.heroesUrl, body, options)
                .map(this.extractData)
                .catch(this.handleError);

@marclaval
Copy link
Contributor

This is an actual bug which needs to be fixed

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants