I have following Code with an Post Request.
submitOffer(val: NewOfferForm) {
const body = JSON.stringify({data: val, TOKEN: this.currentUser.token});
return this.http.post(this.pathRoute.path + 'NEW_OFFER', body, { withCredentials: true })
.map((response: Response) => {
const Response = response.json();
if (Response) {
return Response;
} else {
return response.json().ERROR;
}
});
}
I've set Cookies in Angular and want to send them with the request, but it doesn't work.