On this page:
payload.Function
payload.buffered
payload.form
payload.json
payload.gzip
payload.pure
8.16.0.4

5 Payload Data🔗ℹ

Equivalent to

(Headers)

  -> values(Headers, Bytes || String || Port.Input)

representing a function to generate a payload for Session.request.

Produces a payload function that buffers the result of f in memory to determine its length before sending it to the server.

Produces a payload function that encodes v as form data using the application/x-www-form-urlencoded content type.

function

fun payload.json(v :: JSON) :: payload.Function

Produces a payload function that encodes v as JSON data.

Produces a payload function that gzips the output of f.

Produces a payload function that uses inp as the request body.