This post method is using in angular2. In this ajax call , the post method is doesnt waiting for response. can any one say how to use observable for holding the asynchrouous in javascript until response receives .
this.http.post("http://jsonplaceholder.typicode.com/posts",body,options)
.map((res:Response) => res.json())
.subscribe(
data => { console.log("data is",data)},
err => console.error(err),
() => console.log('done')
);