Named parameters for a HTTP request.
Optionalbody?: BodyInitBody to use for request.
Optionalcredentials?: "omit" | "include" | "same-origin"Send Credentials with request.
When set to true credentials will be set to same-orign
Optionalheaders?: HeadersInitHeaders to add to the request.
Optionalmethod?: "GET" | "OPTIONS" | "POST" | "PATCH"HTTP method to use for the request.
Optionalmode?: "same-origin" | "no-cors" | "cors"OptionalreferrerPolicy?: ReferrerPolicyOptionalsignal?: AbortSignalRequest signal.
URL for the request to be made against.
When calling this fetcher, ensure that you have provided everything required to make the request.
const myRequest = httpRequest({
url: "https://my-domain-name.tld/some-path",
headers: {
"Content-Type": "application/json"
},
body: {
"a_key": "a value"
}
})
HTTPNotAuthenticated HTTP/401 was returned.
This object is intended to serve as the single point for all HTTP requests that the UI will make.