maxwell v2.2.2 Maxwell.Adapter.Hackney

hackney adapter

Summary

Functions

Send request without chang it's body formant

Send file request

Send multipart form request

Send stream request

Functions

send_direct(conn)

Send request without chang it's body formant.

  • conn - %Maxwell.Conn{}

Returns {:ok, %Maxwell.Conn{}} or {:error, reason_term, %Maxwell.Conn{}}.

send_file(conn)

Send file request.

  • conn - %Maxwell.Conn{}, the reqbody is {:file, filepath}. Auto change to chunked mode if reqheaders has %{"transfer-encoding" => "chunked"

Returns {:ok, %Maxwell.Conn{}} or {:error, reason_term, %Maxwell.Conn{}}.

send_multipart(conn)

Send multipart form request.

Returns {:ok, %Maxwell.Conn{}} or {:error, reason_term, %Maxwell.Conn{}}.

send_stream(conn)

Send stream request.

  • conn - %Maxwell.Conn{}, the req_body is Stream. Always chunked mode

Returns {:ok, %Maxwell.Conn{}} or {:error, reason_term, %Maxwell.Conn{}}.