Interface: ScrapperRequestContext
Defined in: batteries/tools/scrapper/shared.ts:115
Mutable context handed to each input-pipeline stage before the HTTP request is sent. Identical for both verbs.
Properties
| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
headers | public | ToolHeaders | Resolved request headers sent to the SCRAPPER INSTANCE (auth). Mutable. | batteries/tools/scrapper/shared.ts:123 |
instanceUrl | readonly | string | The Scrapper instance base URL (read-only). | batteries/tools/scrapper/shared.ts:125 |
params | public | Record<string, string> | Wire-kebab query params (everything except url). Mutable. | batteries/tools/scrapper/shared.ts:121 |
stash | readonly | Map<string, unknown> | Cross-stage scratch space; also carried onto the response context. | batteries/tools/scrapper/shared.ts:127 |
toolName | readonly | string | The tool's name (read-only). | batteries/tools/scrapper/shared.ts:117 |
url | public | string | The target page URL (the url argument). Mutable. | batteries/tools/scrapper/shared.ts:119 |
Methods
shortCircuit()
ts
shortCircuit(result: string): void;Defined in: batteries/tools/scrapper/shared.ts:129
Skip the fetch and return result verbatim as the tool's output (e.g. a cache hit).
Parameters
| Parameter | Type |
|---|---|
result | string |
Returns
void