RestRequest
RestRequest =
object
Defined in: packages/core/src/rest/types.ts:12
Describes an outgoing HTTP request to a platform API.
Precondition
Section titled “Precondition”path is a relative path (e.g., “/videos”)
Postcondition
Section titled “Postcondition”query values are URL-encoded by the RestManager
Properties
Section titled “Properties”
optionalbody:unknown
Defined in: packages/core/src/rest/types.ts:16
bodyType?
Section titled “bodyType?”
optionalbodyType:"json"|"raw"
Defined in: packages/core/src/rest/types.ts:22
Body serialization format.
- “json” (default): JSON.stringify the body and set Content-Type: application/json
- “raw”: pass body directly to fetch (e.g., for FormData, URLSearchParams, ReadableStream)
bucketId?
Section titled “bucketId?”
optionalbucketId:string
Defined in: packages/core/src/rest/types.ts:27
Rate limit bucket key (e.g., “videos:list”, “search:list”).
headers?
Section titled “headers?”
optionalheaders:Record<string,string>
Defined in: packages/core/src/rest/types.ts:23
method
Section titled “method”method:
"GET"|"POST"|"PUT"|"PATCH"|"DELETE"
Defined in: packages/core/src/rest/types.ts:13
path:
string
Defined in: packages/core/src/rest/types.ts:14
query?
Section titled “query?”
optionalquery:Record<string,string|string[]>
Defined in: packages/core/src/rest/types.ts:15
signal?
Section titled “signal?”
optionalsignal:AbortSignal
Defined in: packages/core/src/rest/types.ts:25
AbortSignal to cancel the request.