brian-watkins/elm-spec/1.0.0

NOTE: the latest version is 3.3.2

Spec.Http.Route

Functions for defining HTTP routes.

type alias HttpRoute =
{ method : String
, url : String
}

An HTTP route is an HTTP method plus a URL.

Define a Route

get : String -> HttpRoute

Define a GET route.

post : String -> HttpRoute

Define a POST route.

route : String -> String -> HttpRoute

Define a route with the given method and url.

Spec.Http.Route.route "PATCH" "http://fake-server.com/fake"