Body set to empty string
shaunPmulligan opened this issue · 1 comments
Hi
Not sure if I am using the post method wrong, however the following method, seems to set the body to "", so when I post to my API, nothing is ever sent to it, by removing body: "" it works. Is there another way to accomplish this?
private setRequestOptions(options?: RequestOptions | null) { if (options) { this.appendAuthHeader(options.headers); } else { options = new RequestOptions({ headers: this.getHeaders(), body: "" }); } return options; }
Thanks a lot
Shaun
@shaunPmulligan it looks like if you have no request options then this function might be overwriting the body set in your post method. Just taking out the body: "" might be the easiest way to fix if that doesn't cause any issues for the other actions.