gleam/http

Types

Method

HTTP methods as defined by RFC 2616, and PATCH which is defined by RFC 5789.

pub type Method {
  Get
  Post
  Head
  Put
  Delete
  Trace
  Connect
  Options
  Patch
  Other(String)
}

Constructors

  • Get
  • Post
  • Head
  • Put
  • Delete
  • Trace
  • Connect
  • Options
  • Patch
  • Other(String)

    Non-standard but valid HTTP methods.

Functions

method_from_erlang

pub external fn method_from_erlang(
  anything,
) -> Result(Method, Nil)

method_to_string

pub fn method_to_string(method: Method) -> String

parse_method

pub fn parse_method(s: String) -> Result(Method, Nil)