I need to cancel a httpRequest with DELETE verb before it finishes (because user has canceled the operation)
The solution I have found seems to be just canceling the subscription to the observable, but if the httpRequest was sent and process by the API is not really canceling the request, is just canceling the reaction to the request finishing - https://stackoverflow.com/a/36491025/1461862
Is there a way to cancel the actual request (not the subscription) before if finishes ?
export class MileageTrackingService extends BaseService {
public deleteByDomainId(id, domainId: string) {
const params = new HttpParams().set('domainId', domainId)
return this.httpClient.delete<any>(`API-URL/mil-track/${id}`, { params });
}
}