apocryphal v0.2.0 Apocryphal

Summary

Functions

Deserializes an HTTP Response

Serializes an HTTP Body

Example

  config :apocryphal,
    port: 4001,
    host: "localhost"

Functions

deserialize(body, mime)

Specs

deserialize(Map.t | List.t, String.t) :: String.t

Deserializes an HTTP Response

Example

  config :apocryphal,
    deserializers: %{
      "application/json" => fn(body) -> Poison.decode!(body) end
    }
dir()
expand(map)
parse(path)

Specs

parse(String.t) :: Map.t
serialize(body, mime \\ nil)

Specs

serialize(Map.t | List.t, String.t) :: String.t

Serializes an HTTP Body

Example

  config :apocryphal,
    serializers: %{
      "application/json" => fn(body) -> Poison.encode!(body) end
    }
url(path)

Specs

url(String.t) :: String.t

Example

  config :apocryphal,
    port: 4001,
    host: "localhost"
url(host, port, path)