RequestOptions
Defined in: clients/http-client/src/rest-client.ts:64
Options for one RestClient.request call.
Properties
Section titled “Properties”
optionalbody?:unknown
Defined in: clients/http-client/src/rest-client.ts:68
The request body; sent as JSON with a content-type header. Left out or undefined, no body is sent.
expectNoContent?
Section titled “expectNoContent?”
optionalexpectNoContent?:boolean
Defined in: clients/http-client/src/rest-client.ts:72
Return undefined without parsing even on a 200 response.
method?
Section titled “method?”
optionalmethod?:"GET"|"POST"|"PATCH"|"PUT"|"DELETE"
Defined in: clients/http-client/src/rest-client.ts:66
The HTTP method. Defaults to "GET".
onResponse?
Section titled “onResponse?”
optionalonResponse?: (headers) =>void
Defined in: clients/http-client/src/rest-client.ts:78
Called with the response headers of a successful (2xx) response, before the body is read. For a value the vendor returns in a header rather than the body (GitHub’s token expiry). A failed response throws as before and does not call it.
Parameters
Section titled “Parameters”headers
Section titled “headers”Headers
Returns
Section titled “Returns”void
query?
Section titled “query?”
optionalquery?:Record<string,string>
Defined in: clients/http-client/src/rest-client.ts:70
Per-request query params, merged after defaultQuery.