I am calling an API for updating Project name, description and using ID. I have a PUT request that updates all the data. But I want to update only Project name and description. I am not able to perform the PATCH call provider. Can someone tell me how to call the PATCH request
thanks.
This is my PUT request. And I want PATCH request
put(apiUrl, data) {
const apiURL = environment.endPointUrl + apiUrl;
const httpOptions = {
headers: new HttpHeaders({
'Content-Type': 'application/json',
AuthenticationKey: `${CryptoJS.AES.decrypt(
localStorage.getItem('UAuthToken') == null
? ''
: localStorage.getItem('UAuthToken'),
environment.EncryptionKey
).toString(CryptoJS.enc.Utf8)}`,
}),
};
return this.http.put(apiURL, data, httpOptions);
}
This is my Service.ts
UpdateProject(data){
const apiURL = 'http://192.168.1.22:8080/TestExpress/projects/updateProject/projectDescription/projectId/projectName';
return this.callProvider.put(apiURL, data);
}