glitr_lustre

Types

pub type RequestFactory {
  RequestFactory(scheme: http.Scheme, host: String, port: Int)
}

Constructors

  • RequestFactory(scheme: http.Scheme, host: String, port: Int)
pub type RouteRequest(p, q, b, c) {
  RouteRequest(
    route: route.Route(p, q, b, c),
    scheme: http.Scheme,
    host: String,
    port: Int,
    path_opt: Option(p),
    query_opt: Option(q),
    body_opt: Option(b),
  )
}

Constructors

  • RouteRequest(
      route: route.Route(p, q, b, c),
      scheme: http.Scheme,
      host: String,
      port: Int,
      path_opt: Option(p),
      query_opt: Option(q),
      body_opt: Option(b),
    )

Functions

pub fn create_factory() -> RequestFactory
pub fn for_route(
  factory: RequestFactory,
  route: Route(a, b, c, d),
) -> RouteRequest(a, b, c, d)
pub fn send(
  rreq: RouteRequest(a, b, c, d),
  as_msg: fn(Result(d, HttpError)) -> e,
  on_error: fn(String) -> Effect(e),
) -> Effect(e)
pub fn with_body(
  request: RouteRequest(a, b, c, d),
  body: c,
) -> RouteRequest(a, b, c, d)
pub fn with_host(
  factory: RequestFactory,
  host: String,
) -> RequestFactory
pub fn with_options(
  request: RouteRequest(a, b, c, d),
  options: RouteOptions(a, b, c),
) -> RouteRequest(a, b, c, d)
pub fn with_path(
  request: RouteRequest(a, b, c, d),
  path: a,
) -> RouteRequest(a, b, c, d)
pub fn with_port(
  factory: RequestFactory,
  port: Int,
) -> RequestFactory
pub fn with_query(
  request: RouteRequest(a, b, c, d),
  query: b,
) -> RouteRequest(a, b, c, d)
pub fn with_scheme(
  factory: RequestFactory,
  scheme: Scheme,
) -> RequestFactory
Search Document