# ResponseHeadersReader.hpp

This File On Github
Ask A Question

API: latest
module: oatpp
#include "oatpp/web/protocol/http/incoming/ResponseHeadersReader.hpp"

# ResponseHeadersReader

Helper class to read http headers of incoming response from stream.

namespace oatpp { namespace web { namespace protocol { namespace http { namespace incoming { 
  class ResponseHeadersReader {}
}}}}}

# Typedefs

Type Name Summary
oatpp::async::Action Action Convenience typedef for oatpp::async::Action.

# Methods

Return Type Name Summary
[none] ResponseHeadersReader Constructor.
Result readHeaders Read and parse http headers from stream.
oatpp::async::CoroutineStarterForResult<const Result&> readHeadersAsync Read and parse http headers from stream in asynchronous manner.

# ResponseHeadersReader::Action

Convenience typedef for oatpp::async::Action.

typedef oatpp::async::Action Action

# ResponseHeadersReader::ResponseHeadersReader

Constructor.

ResponseHeadersReader(const oatpp::data::share::MemoryLabel& buffer, v_buff_size maxHeadersSize)
  : m_buffer(buffer)
  , m_maxHeadersSize(maxHeadersSize)

# ResponseHeadersReader::readHeaders

Read and parse http headers from stream.

Result readHeaders(const std::shared_ptr<oatpp::data::stream::IOStream>& connection, http::HttpError::Info& error)

# ResponseHeadersReader::readHeadersAsync

Read and parse http headers from stream in asynchronous manner.

oatpp::async::CoroutineStarterForResult<const Result&> readHeadersAsync(const std::shared_ptr<oatpp::data::stream::IOStream>& connection)

# ResponseHeadersReader::Result

Result of headers reading and parsing.

namespace oatpp { namespace web { namespace protocol { namespace http { namespace incoming { 
  class ResponseHeadersReader {
    struct Result {}
  };
}}}}}

# Fields

Type Name Summary
http::ResponseStartingLine startingLine oatpp::web::protocol::http::ResponseStartingLine.
http::Headers headers oatpp::web::protocol::http::Headers.
v_buff_size bufferPosStart This value represents starting position in buffer used to read data from stream for the last read operation.
v_buff_size bufferPosEnd This value represents end position in buffer used to read data from stream for the last read operation.

# ResponseHeadersReader::Result::startingLine

oatpp::web::protocol::http::ResponseStartingLine.

http::ResponseStartingLine startingLine

# ResponseHeadersReader::Result::headers

oatpp::web::protocol::http::Headers.

http::Headers headers

# ResponseHeadersReader::Result::bufferPosStart

This value represents starting position in buffer used to read data from stream for the last read operation.

v_buff_size bufferPosStart

# ResponseHeadersReader::Result::bufferPosEnd

This value represents end position in buffer used to read data from stream for the last read operation.

v_buff_size bufferPosEnd