# RequestTask.abort

Call RequestTask.abort() to abort the request task.

## Support

This API only supports gadget calls, and the corresponding client version support is as follows.

App capability | Android | iOS | PC | Harmony | Preview
---|---|---|---|---|---
Gadget | **✓** | **✓** | **✓** | V7.35.0+ | Preview
Web app | **X** | **X** | **X** | **X** | /

## Input
None

## Output
None

##  Sample code

```js
try {
    const requestTask = tt.request({"url":"https://www.toutiao.com","data":{"noncestr":1637496519175},"header":{"content-type":"application/json"},"method":"GET","dataType":"json","responseType":"text"});
    requestTask.abort();
} catch (error) {
    console.log(`abort fail: ${JSON.stringify(error)}`);
}
```