2020-06-04 14:56:45 +00:00
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home ](./index.md ) > [puppeteer ](./puppeteer.md ) > [HTTPRequest ](./puppeteer.httprequest.md ) > [abort ](./puppeteer.httprequest.abort.md )
## HTTPRequest.abort() method
2020-07-03 13:28:45 +00:00
Aborts a request.
2020-06-04 14:56:45 +00:00
< b > Signature:< / b >
```typescript
abort(errorCode?: ErrorCode): Promise< void > ;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
2020-07-03 13:28:45 +00:00
| errorCode | [ErrorCode ](./puppeteer.errorcode.md ) | optional error code to provide. |
2020-06-04 14:56:45 +00:00
< b > Returns:< / b >
Promise< void>
2020-07-03 13:28:45 +00:00
## Remarks
To use this, request interception should be enabled with [Page.setRequestInterception() ](./puppeteer.page.setrequestinterception.md )<!-- --> . If it is not enabled, this method will throw an exception immediately.