View Source Rambla.Http (Rambla v1.2.5)

Default connection implementation for 🕸️ HTTP.

It expects a message to be a map, containing the following fields: :method, :path, :query, :body and the optional :type that otherwise would be inferred from the body type.

For instance, this call would send a POST request with a JSON specified as body.

Rambla.publish(
  Rambla.Http,
  %{method: :post, body: %{message: "I ❤ HTTP"}}
}

If the second argument message is binary() it’s treated as an URL and :get is implied.


List of all possible options might be found in :httpc.request/4, names are preserved.