Kadabra v0.3.8 Kadabra.Stream.Response View Source
Response struct returned from open streams.
If received as a push promise, :status
and :body
will
most likely be empty.
Sample response for a PUT
request
%Kadabra.Stream.Response{
body: "SAMPLE ECHO REQUEST",
headers: [
{":status", "200"},
{"content-type", "text/plain; charset=utf-8"},
{"date", "Sun, 16 Oct 2016 21:28:15 GMT"}
],
id: 1,
status: 200
}
Link to this section Summary
Functions
Fetches header with given name
Link to this section Types
Link to this section Functions
Fetches header with given name.
Examples
iex> stream = %Kadabra.Stream.Response{headers: [{":status", "200"}]}
iex> Kadabra.Stream.Response.get_header(stream.headers, ":status")
{":status", "200"}