VendorTransport
@forge/monorepo / backend/src / VendorTransport
Type Alias: VendorTransport
VendorTransport =
object
Defined in: backend/src/toolkit/vendor.ts:75
Properties
json
readonlyjson: (context,path,init?) =>Promise<unknown>
Defined in: backend/src/toolkit/vendor.ts:77
Parsed JSON, or undefined when the vendor answered with no body — a 204 is a success.
Parameters
context
path
string
init?
body?
unknown
method?
string
Returns
Promise<unknown>
text
readonlytext: (context,path,init?) =>Promise<string>
Defined in: backend/src/toolkit/vendor.ts:83
The body verbatim, for the endpoints that do not answer in JSON.
Parameters
context
path
string
init?
body?
unknown
contentType?
string
method?
string
rawBody?
string
Sent as-is, with contentType, instead of being JSON-encoded.
For a media endpoint: Drive's uploadType=media wants the file's bytes, and JSON.stringify on a
string produces a quoted string — a file whose contents are a JSON literal, uploaded successfully.
Nothing errors, which is why this is a parameter rather than a caller's JSON.parse dance.
Returns
Promise<string>