catalyst v0.1.0 Catalyst.Http View Source

Wrappers around erlangs :httpc for conveniences

Link to this section Summary

Functions

Makes an http requst, allows to pass headers

Makes an http requst, allows to pass headers, content_type and body

Link to this section Functions

Link to this function http_request(method, url, headers \\ []) View Source

Makes an http requst, allows to pass headers

Examples

iex> Catalyst.Http.http_request :get, 'http://example.com'
{{'HTTP/1.1', 200, 'Ok'}, 'body'}
Link to this function http_request(method, url, headers, content_type, body) View Source

Makes an http requst, allows to pass headers, content_type and body

Examples

iex> Catalyst.Http.http_request :put, 'http://webdav.com/some_file.txt', [{'Authorization', 'Basic asdJasd='}], 'multipart/form-data.txt', ""
{{'HTTP/1.1', 201, 'Created'}, []}