Oneflow v0.2.0 Oneflow.Http.Request
Link to this section Summary
Functions
Oneflow api excpect request’s content-type to be json. This function encodes the body with poison
Given a method and a path instantiates a oneflow request
Link to this section Functions
Link to this function
body(req)
Oneflow api excpect request’s content-type to be json. This function encodes the body with poison.
Examples
iex> alias Oneflow.Http.Request iex> request = Request.new(:get, “/shipments”, %{}, %{“key” => “value”}) iex> Request.body(request) “{\”key\”:\”value\”}”
Link to this function
new(method, path, params \\ %{}, payload \\ %{}, opts \\ [])
Given a method and a path instantiates a oneflow request.
Examples
iex> alias Oneflow.Http.Request iex> Request.new(:get, “/shipments”) %Oneflow.Http.Request{body: %{}, method: :get, opts: [], params: %{}, path: “/shipments”}