How can I send JSON data with patch request and which method to connect to API?
private baseUrlRemoveNotifications: string =
"api/v1.0/UploadDownload/removeNotifications";
public removeNotificationForUser(onlineUserModel: OnlineUserModel) {
let username = onlineUserModel.userName;
const url = `${this.baseUrlRemoveNotifications}`;
const options = {
headers: new HttpHeaders({
"Content-Type": "application/json",
}),
};
return this.http.patch(
`${this.baseUrlRemoveNotifications}`,
username,
options
);
}