Welcome to Westonci.ca, your one-stop destination for finding answers to all your questions. Join our expert community now! Discover comprehensive solutions to your questions from a wide network of experts on our user-friendly platform. Connect with a community of professionals ready to help you find accurate solutions to your questions quickly and efficiently.
Sagot :
Answer:
I am trying to get full response from a POST request. I have read how to get full response for a get request mentioned at the official site of angular. Angular http
What it says is to add { observe: 'response' }. But it would work for a get request and not for post request. post request accepts 2-3 arguments, so I cannot send this as the 4th argument. Please have a look at my code and let me know what I am doing wrong.
Explanation:
const httpOptions: { headers; observe; } = {
headers: new HttpHeaders({
'Content-Type': 'application/json'
}),
observe: 'response'
};
return this.http.post('http://localhost:3000/api/Users/login', data, httpOptions) ..
Thank you for your visit. We're committed to providing you with the best information available. Return anytime for more. Thanks for using our platform. We aim to provide accurate and up-to-date answers to all your queries. Come back soon. Find reliable answers at Westonci.ca. Visit us again for the latest updates and expert advice.