centurion-ui
    Preparing search index...

    Function httpRequest

    • This object is intended to serve as the single point for all HTTP requests that the UI will make.

      Parameters

      • __namedParameters: HTTPNamedParams

        Named parameters for a HTTP request.

        • Optionalbody?: BodyInit

          Body 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?: HeadersInit

          Headers to add to the request.

        • Optionalmethod?: "GET" | "OPTIONS" | "POST" | "PATCH"

          HTTP method to use for the request.

        • Optionalmode?: "same-origin" | "no-cors" | "cors"
        • OptionalreferrerPolicy?: ReferrerPolicy
        • Optionalsignal?: AbortSignal

          Request signal.

        • url: string

          URL for the request to be made against.

      Returns Promise<Response>

      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"
      }
      })

      0.13.0

      HTTPNotAuthenticated HTTP/401 was returned.