gossamer/request

Types

pub type Request

Values

pub fn array_buffer(
  of request: Request,
) -> promise.Promise(Result(array_buffer.ArrayBuffer, String))
pub fn blob(
  of request: Request,
) -> promise.Promise(Result(blob.Blob, String))
pub fn body(
  of request: Request,
) -> Result(
  readable_stream.ReadableStream(uint8_array.Uint8Array),
  Nil,
)
pub fn bytes(
  of request: Request,
) -> promise.Promise(Result(uint8_array.Uint8Array, String))
pub fn cache(of request: Request) -> request_cache.RequestCache

Returns the cache mode associated with the request.

Note: Not available on Deno. See https://github.com/denoland/deno/issues/27763

pub fn clone(request: Request) -> Request
pub fn credentials(
  of request: Request,
) -> request_credentials.RequestCredentials

Returns the credentials mode associated with the request.

Note: Not available on Deno. See https://github.com/denoland/deno/issues/27763

pub fn destination(
  of request: Request,
) -> request_destination.RequestDestination

Returns the kind of resource requested by the request.

Note: Not available on Deno. See https://github.com/denoland/deno/issues/27763

pub fn form_data(
  of request: Request,
) -> promise.Promise(Result(form_data.FormData, String))
pub fn headers(of request: Request) -> headers.Headers
pub fn integrity(of request: Request) -> String

Returns the subresource integrity metadata of the request.

Note: Not available on Deno. See https://github.com/denoland/deno/issues/27763

pub fn is_body_used(request: Request) -> Bool
pub fn is_keepalive(request: Request) -> Bool

Returns whether the request can outlive the global in which it was created.

Note: Not available on Deno. See https://github.com/denoland/deno/issues/27763

pub fn json(
  of request: Request,
) -> promise.Promise(Result(dynamic.Dynamic, String))
pub fn method(of request: Request) -> http_method.HttpMethod
pub fn mode(of request: Request) -> request_mode.RequestMode

Returns the mode associated with the request.

Note: Not available on Deno. See https://github.com/denoland/deno/issues/27763

pub fn new(input: String) -> Result(Request, String)
pub fn new_with_init(
  input: String,
  with init: List(request_init.RequestInit),
) -> Result(Request, String)
pub fn redirect(
  of request: Request,
) -> request_redirect.RequestRedirect
pub fn referrer(of request: Request) -> String

Returns the referrer of the request.

Note: Not available on Deno. See https://github.com/denoland/deno/issues/27763

pub fn referrer_policy(
  of request: Request,
) -> referrer_policy.ReferrerPolicy

Returns the referrer policy associated with the request.

Note: Not available on Deno. See https://github.com/denoland/deno/issues/27763

pub fn signal(of request: Request) -> abort_signal.AbortSignal
pub fn text(
  of request: Request,
) -> promise.Promise(Result(String, String))
pub fn url(of request: Request) -> String
Search Document