flux_adapters v0.1.0 FluxAdapters.Plug
Link to this section Summary
Functions
Sends a chunk in the chunked response
Reads the request body
Sends the given status, headers as the beginning of a chunked response to the client
Sends the given status, headers and file as a response back to the client
Sends the given status, headers and body as a response back to the client
Link to this section Functions
Sends a chunk in the chunked response.
If the request has method "HEAD"
, the adapter should
not send the response to the client.
Webservers are advised to return :ok
and not modify
any further state for each chunk. However, the test
implementation returns the actual body and payload so
it can be used during testing.
Callback implementation for Plug.Conn.Adapter.chunk/2
.
Reads the request body.
Read the docs in Plug.Conn.read_body/2
for the supported
options and expected behaviour.
Callback implementation for Plug.Conn.Adapter.read_req_body/2
.
Sends the given status, headers as the beginning of a chunked response to the client.
Webservers are advised to return nil
as the sent_body,
as the body can no longer be manipulated. However, the
test implementation returns the actual body so it can
be used during testing.
Callback implementation for Plug.Conn.Adapter.send_chunked/3
.
Sends the given status, headers and file as a response back to the client.
If the request has method "HEAD"
, the adapter should
not send the response to the client.
Webservers are advised to return nil
as the sent_body,
as the body can no longer be manipulated. However, the
test implementation returns the actual body so it can
be used during testing.
Callback implementation for Plug.Conn.Adapter.send_file/6
.
Sends the given status, headers and body as a response back to the client.
If the request has method "HEAD"
, the adapter should
not send the response to the client.
Webservers are advised to return nil
as the sent_body,
as the body can no longer be manipulated. However, the
test implementation returns the actual body so it can
be used during testing.
Callback implementation for Plug.Conn.Adapter.send_resp/4
.