definy.json-response
- description
- (en) Respond with JSON and the CORS headers
- type
Fn(status: Number, body: @definy.json) -> @definy.service-io
- expression
fn(status$0, body$1) =>
#done<@definy.service-io>(#respond({
status: $0,
headers: @core.list-concat(
left: [{name: "Content-Type", value: "application/json; charset=utf-8"}],
right: @definy.cors-headers
),
body: #json<@definy.http-body>($1)
}))- visibility
- public
definy.json-response (project definy, branch release-time-compare, snapshot JJrRgQW_LZN6tN8CbYr1dN7HosqNTuIWWYx7ACbt1n0)
id: gUbhATQx3L1FzWPr8tyX6OqWPk23aZ4AseX91k4DfEU
content hash: PgZesH2mJWjATFkJOGq2mQ4ULBIzFyaAqzmBWgioqt8