I am updating my angular application package from @angular/http to @angular/common/http. In the process my code is breaking due to following reason
In the current version I am able to send both formdata and request body in the below way
this.http.post(URL, formData, {'header': headerObj, 'body': bodyObj})
but in the upgrade I am only able to send formData or body not both
this.httpClient.post(this.hostname + apiURL, formData, options)
I don't want to convert request body to formData object since I will be sending null or undefined to server which gets converted to string null which I don't want.
Is there a solution to fix this?