Maxwell.Adapter.Util (maxwell v2.4.0) View Source
Utils for Adapter
Link to this section Summary
Functions
Check req_headers has transfer-encoding: chunked.
Add content-type to headers if don't have;
Add content-length to headers if not chunked
Converts the headers map to a list of tuples.
Encode multipart form.
Fetch the first element from stream.
Append path and query string to url
Link to this section Functions
Check req_headers has transfer-encoding: chunked.
conn-Maxwell.Conn
Add content-type to headers if don't have;
Add content-length to headers if not chunked
chunked-boolean, is chunked modeconn-Maxwell.Conn
Converts the headers map to a list of tuples.
headers-Map.t, for example:%{"content-type" => "application/json"}
Examples
iex> headers_serialize(%{"content-type" => "application/json"})
[{"content-type", "application/json"}]
Encode multipart form.
conn-Maxwell.Connmultiparts- seeMaxwell.Multipart.encode_form/2
Fetch the first element from stream.
Append path and query string to url
url-conn.urlpath-conn.pathquery-conn.querytype-:char_listor:string, default is :string
Examples
#http://example.com/home?name=foo
iex> url_serialize("http://example.com", "/home", %{"name" => "foo"})