Instream v0.14.0 Instream.Response

Response handling module.

Summary

Functions

Maybe parses a response based on the requested result type

Parses the response of a ping query

Parses the response of a status query

Parses the response of a version query

Types

t()
t() :: {status :: pos_integer, headers :: list, body :: String.t}

Functions

maybe_parse(arg, opts)
maybe_parse(t, Keyword.t) :: any

Maybe parses a response based on the requested result type.

parse_ping(arg1)
parse_ping(any) :: :pong | :error

Parses the response of a ping query.

parse_status(arg1)
parse_status(any) :: :ok | :error

Parses the response of a status query.

parse_version(arg1)
parse_version(any) :: String.t | :error

Parses the response of a version query.

Returns “unknown” if the response did not contain a parseable header.