Skip to main content

Module split

Module split 

Source
Expand description

Writing a structure as a JSON body with its header members taken out, in one pass: the body goes straight to bytes, and each header member becomes header text on the way. A structure with an @httpPayload member writes that member’s bytes as the body instead, raw.

Functions§

text
A header member’s value as header text: a list is comma-separated.
write
Writes value (a structure) into out as a JSON object without the members members binds to headers, and returns those as (header, text). With a payload member, out gets that member’s bytes instead.
write_bound
Writes value (an input) into out as a JSON object of its body members only, and returns every bound member (label, query parameter or header) with its value: what a client needs to build the request. With a payload member, out gets that member’s bytes instead.
write_typed
[write], with "__type": type_name appended when one is given: how an error body names its error.