Skip to main content

Function: wrapRequestContext()

wrapRequestContext(context, config?, internals?): APIRequestContext

Defined in: wrapRequestContext.ts:159

Wrap a Playwright APIRequestContext so every request logs a compact summary line (or, with format: 'verbose', a colorful request/response summary) and optionally the equivalent curl command before delegating to the real context. Non-HTTP members (dispose, storageState, ...) pass through untouched.

Parameters​

context​

APIRequestContext

config?​

ApiLoggerConfig = {}

internals?​

WrapInternals = {}

Returns​

APIRequestContext