def call.send

ezmcp@0.1.0.0 · src/openapi.bend:1261

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
import emerging-ezhttp@0.21.0.0/src/qs.bend as Qs

1261# the request built, or the path when a template expression is still in it
1262def call.send(
1263  unfilled: Bool,
1264  method: String,
1265  +mt: String,
1266  +body: Maybe<&2, String>,
1267  path: String,
1268  pairs: List<&2, Qs.Kv()>,
1269  hs: List<&2, Http.Header>
1270) -> Call:
1271  match unfilled:
1272    case True{}:
1273      Unfilled{path}
1274    case False{}:
1275      Send{method, path ++ query.text(pairs), List.append(&2, Http.Header,
1276        Http.H{"Accept", "application/json"} <> hs, ctype(mt, body)), body}

Uses (11)

Used by (1)