I want to make a POST request to an API. The API expects a date in the following format yyyy-MM-dd HH:mm:ss.SSS.
I have a request object with an attribute of Type Date.
When I make the POST request via
this.http.post<ResponseObject>(url, objectWithDateAttribute, headers);
My API throws an error because the JSON format of the attribute of type date doesn't match.
How can I change the JSON format of the Date attribute when I make the POST request?