I have a simple Angular (13) app that sends requests to APIs written in classic ASP (VBscript).
When I call the APIs with "get" in the app, everything is working fine. But when I try to do "post" calls, the Request object in the API doesn't recognize the data, as if it's totally empty.
The API code:
id = Request("id") 'can also be Request.Form("id")
The API call:
const headers = new HttpHeaders({
"Content-Type": "text/html"
});
const options = { headers: headers };
const payload = {id: 123};
this.http.post(url, payload, options);
Under the "Conteny-Type" I also tried "application/json" and "application/x-www-form-urlencoded", getting the same result.
I need to make these "post" calls because of large data payload, that is not supported in "get" calls.