There is a post request inside my method transmitProject(project: ProjectModel): Observable<boolean>
via the HttpClient
where I would like to post data to my backend:
-- inside my transmitProject
-method
const params = {
projectId: project.projectId,
description: documentation.description,
// some other attributes ...
};
return this.http.post(this.conf.url, params).pipe(
map(response => {
console.log(response);
return true;
})
);
... until here everyhting works fine. But the request sets the post data in json format. For testing the backend-server return the dumped $_POST variable -> null.
Request Payload: {projectId: "...", description: "...", longitude: 10, latitude: 10, … }
should actually be: projectId=...description=...longitude=10latitude=10...
-> In Postman everyhting works fine.