def step.of

emerging-ezhttp@0.21.0.0 · src/step.bend:30

import emerging-ezhttp@0.21.0.0/src/step.bend as Step
import Base
import emerging-ezhttp@0.21.0.0/src/http.bend as Http

30# a bad request is answered 400 with its reason and never reaches the
31# handler; a good one goes to the handler as it was parsed
32def step.of(req: Http.Request) -> Step:
33  match req:
34    case Http.Bad{why}:
35      Answer{Http.Reply{400, [], why}}
36    case Http.Request{method, target, headers, body}:
37      Call{Http.Request{method, target, headers, body}}

Uses (4)

Used by (1)