Closed jamalkarami closed 11 months ago
Assuming you're also using the @awesome-cordova-plugins wrapper, I found there's methods that end with *Sync that return a string requestId to use with abort, like
let requestId = this.http.sendRequestSync(url, options, (result: HTTPResponse) => console.log('Success!'), (error: any) => console.log('Failure!') );
this.http.abort(requestId);
Thanks @chrisjdev for your answer, it will helpfull for other developpers.
Thank you for feedback guys! Closing this to keep track of open issues, but it will be still discoverable for other developers.
Hi everyone, I hope you are fine.
I have tried to use abort method for aborting a request as written in Readme file.
But when I try the same code, It doesn't work, the requestId is underlined in red with this error : L'argument de type 'Promise' n'est pas attribuable au paramètre de type 'string'.
The request methods post|get|put|delete|patch|downloadFile|uploadFile| return a Promise not string id
Thanks for any help in how to get requestId ?