def ctype

ezmcp@0.1.0.0 · src/openapi.bend:1245

import ezmcp@0.1.0.0/src/openapi.bend as Openapi
import Base
import emerging-ezhttp@0.21.0.0/src/http.bend as Http

1245# the header field naming a body's media type, when there is a body
1246def ctype(+mt: String, body: Maybe<&2, String>) -> List<&2, Http.Header>:
1247  match body:
1248    case None{}:
1249      []
1250    case Some{_b}:
1251      [Http.H{"Content-Type", mt}]

Uses (4)

Used by (1)