mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
chore: add maxRetries to APIRequestContext.delete (#31893)
This commit is contained in:
parent
cc313f3290
commit
f45cf65921
@ -180,6 +180,9 @@ context cookies from the response. The method will automatically follow redirect
|
|||||||
### option: APIRequestContext.delete.maxRedirects = %%-js-python-csharp-fetch-option-maxredirects-%%
|
### option: APIRequestContext.delete.maxRedirects = %%-js-python-csharp-fetch-option-maxredirects-%%
|
||||||
* since: v1.26
|
* since: v1.26
|
||||||
|
|
||||||
|
### option: APIRequestContext.delete.maxRetries = %%-js-python-csharp-fetch-option-maxretries-%%
|
||||||
|
* since: v1.46
|
||||||
|
|
||||||
## async method: APIRequestContext.dispose
|
## async method: APIRequestContext.dispose
|
||||||
* since: v1.16
|
* since: v1.16
|
||||||
|
|
||||||
|
|||||||
6
packages/playwright-core/types/types.d.ts
vendored
6
packages/playwright-core/types/types.d.ts
vendored
@ -15807,6 +15807,12 @@ export interface APIRequestContext {
|
|||||||
*/
|
*/
|
||||||
maxRedirects?: number;
|
maxRedirects?: number;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Maximum number of times network errors should be retried. Currently only `ECONNRESET` error is retried. Does not
|
||||||
|
* retry based on HTTP response codes. An error will be thrown if the limit is exceeded. Defaults to `0` - no retries.
|
||||||
|
*/
|
||||||
|
maxRetries?: number;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Provides an object that will be serialized as html form using `multipart/form-data` encoding and sent as this
|
* Provides an object that will be serialized as html form using `multipart/form-data` encoding and sent as this
|
||||||
* request body. If this parameter is specified `content-type` header will be set to `multipart/form-data` unless
|
* request body. If this parameter is specified `content-type` header will be set to `multipart/form-data` unless
|
||||||
|
|||||||
@ -1288,7 +1288,7 @@ it('should not work after context dispose', async ({ context, server }) => {
|
|||||||
expect(await context.request.get(server.EMPTY_PAGE).catch(e => e.message)).toContain('Test ended.');
|
expect(await context.request.get(server.EMPTY_PAGE).catch(e => e.message)).toContain('Test ended.');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should retrty ECONNRESET', {
|
it('should retry on ECONNRESET', {
|
||||||
annotation: { type: 'issue', description: 'https://github.com/microsoft/playwright/issues/30978' }
|
annotation: { type: 'issue', description: 'https://github.com/microsoft/playwright/issues/30978' }
|
||||||
}, async ({ context, server }) => {
|
}, async ({ context, server }) => {
|
||||||
let requestCount = 0;
|
let requestCount = 0;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user