Interface: FpRequest
Defined in: fp-api.d.ts:32
Mutable view of the outgoing HTTP request.
In pre-request scripts every field is writable — changes are persisted to the request that is actually sent.
In post-response scripts the fetch already occurred; assigning to any
field throws at runtime. A future refinement (REQ-42) will type this as
Readonly<FpRequest> in post-response.
Properties
Section titled “Properties”binaryFileRef
Section titled “binaryFileRef”readonly binaryFileRef: string | undefined;Defined in: fp-api.d.ts:71
Reference to the staged binary file when bodyType === 'binary',
undefined otherwise. The reference is opaque (<sha256>__<name>) and
read-only — scripts cannot mutate the binary attachment from a script.
body: string | FpMultipartBody | undefined;Defined in: fp-api.d.ts:58
Request body. The shape depends on bodyType:
'none':undefined.'raw'/'x-www-form-urlencoded': a string (mutable in pre-request).'binary': NOT exposed — reads asundefined, writes throw. UsebinaryFileReffor the staged-file identifier; the bytes themselves stay in the host realm.'multipart-form': an FpMultipartBody object with apartsarray. Mutate viabody.parts.push(...), indexed access, or splice. File parts may only be added by referencing an already-stagedfileRef— raw bytes are never accepted from scripts.
Assigning null/undefined clears string bodies. Assigning to a
multipart body throws — mutate the parts array instead.
bodyType
Section titled “bodyType”readonly bodyType: "none" | "raw" | "x-www-form-urlencoded" | "binary" | "multipart-form";Defined in: fp-api.d.ts:64
Body mode the user picked in the editor. Read-only — switching modes is a user action, not a script action.
headers
Section titled “headers”headers: FpHeaders;Defined in: fp-api.d.ts:40
Case-insensitive header accessor.
method
Section titled “method”method: string;Defined in: fp-api.d.ts:34
HTTP method (e.g. “GET”, “POST”). Case-preserved.
url: string;Defined in: fp-api.d.ts:37
Fully-resolved URL with interpolated {{variables}}.