0 | module HTTP.API.Client.Content
 1 |
 2 | import HTTP.API.Client.Interface
 3 |
 4 | %default total
 5 |
 6 | adj : Any (RequestEncode t) ts -> t -> HTTPRequest -> HTTPRequest
 7 | adj (Here x)  v = {body := toBody @{x} (reqEncodeAs v)}
 8 | adj (There x) v = adj x v
 9 |
10 | public export
11 | Receive ReqContent where
12 |   RecConstraint c = Any (RequestEncode c.result) c.formats
13 |   RecTypes c = [c.result]
14 |   recs     c = [c.result]
15 |   adjRequest c [v] = adj con v
16 |
17 | public export
18 | GetResponse ReqContent where
19 |   RespEncodings _ = []
20 |   RespTypes _ = []
21 |