From a5abd36bc6b9ec262e9f04ec25d7cc82c82f28c3 Mon Sep 17 00:00:00 2001 From: Alex Rudenko Date: Wed, 13 Nov 2024 09:35:05 +0100 Subject: [PATCH] docs: fix the list newlines in Request (#13292) --- docs/api/index.md | 4 +++- docs/api/puppeteer.httprequest.md | 4 +++- packages/puppeteer-core/src/api/HTTPRequest.ts | 1 + 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/docs/api/index.md b/docs/api/index.md index 8e2fe95f11173..ae14a7fc2f408 100644 --- a/docs/api/index.md +++ b/docs/api/index.md @@ -295,7 +295,9 @@ Represents an HTTP request sent by a page. Whenever the page sends a request, such as for a network resource, the following events are emitted by Puppeteer's `page`: -- `request`: emitted when the request is issued by the page. - `requestfinished` - emitted when the response body is downloaded and the request is complete. +- `request`: emitted when the request is issued by the page. + +- `requestfinished` - emitted when the response body is downloaded and the request is complete. If request fails at some point, then instead of `requestfinished` event the `requestfailed` event is emitted. diff --git a/docs/api/puppeteer.httprequest.md b/docs/api/puppeteer.httprequest.md index 6108dd8678e02..fa82907cbe227 100644 --- a/docs/api/puppeteer.httprequest.md +++ b/docs/api/puppeteer.httprequest.md @@ -16,7 +16,9 @@ export declare abstract class HTTPRequest Whenever the page sends a request, such as for a network resource, the following events are emitted by Puppeteer's `page`: -- `request`: emitted when the request is issued by the page. - `requestfinished` - emitted when the response body is downloaded and the request is complete. +- `request`: emitted when the request is issued by the page. + +- `requestfinished` - emitted when the response body is downloaded and the request is complete. If request fails at some point, then instead of `requestfinished` event the `requestfailed` event is emitted. diff --git a/packages/puppeteer-core/src/api/HTTPRequest.ts b/packages/puppeteer-core/src/api/HTTPRequest.ts index d6005d59803fc..31732bf9f5a0e 100644 --- a/packages/puppeteer-core/src/api/HTTPRequest.ts +++ b/packages/puppeteer-core/src/api/HTTPRequest.ts @@ -77,6 +77,7 @@ export const DEFAULT_INTERCEPT_RESOLUTION_PRIORITY = 0; * following events are emitted by Puppeteer's `page`: * * - `request`: emitted when the request is issued by the page. + * * - `requestfinished` - emitted when the response body is downloaded and the * request is complete. *