Reference / @getenginex/sdk / RequestHookContext
RequestHookContext
Context of a request, for EnginexClientHooks. It never includes headers, tokens, the body (only the summary of a multipart body, in body) or the query string: just enough for logging/observability with no risk of leaking secrets.
Extended by
Properties
attempt
attempt:
number
Attempt number: 1 on the first call, 2 on the retry after a renewed 401. In onError, it may be 0 when the call failed before any network attempt (e.g. CONFIGURATION_ERROR while resolving baseUrl/tenantHost/fetch).
body?
optionalbody?:RequestBodySummary
Body summary, only on multipart requests (e.g. kyc.uploadDocument): the name of each field and, for files, type and size — never the original name or the content of the file, nor the value of text fields. Absent on the other requests (JSON body or no body), whose body never reaches the hooks.
method
method:
HttpMethod
HTTP method.
path
path:
string
Path after /api/v1, without a query string, e.g. /auth/login.
url
url:
string
Request URL without the query string: baseUrl + /api/v1 + path, e.g. https://gateway.operator.com/api/v1/auth/login. With baseUrl: '' (same-origin, the default) it is relative, e.g. /api/v1/auth/login.