RequestHeadersReader.hpp

This File On Github
Ask A Question

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

RequestHeadersReader

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

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

Typedefs

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

Methods

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

RequestHeadersReader::Action

Convenience typedef for oatpp::async::Action.

typedef oatpp::async::Action Action

RequestHeadersReader::RequestHeadersReader

Constructor.

  • @param readChunkSize
  • @param maxHeadersSize

RequestHeadersReader(oatpp::data::stream::BufferOutputStream* bufferStream,
                     v_int32 readChunkSize = 2048,
                     v_int32 maxHeadersSize = 4096)
  : m_bufferStream(bufferStream)
  , m_readChunkSize(readChunkSize)
  , m_maxHeadersSize(maxHeadersSize)

RequestHeadersReader::readHeaders

Read and parse http headers from stream.

Result readHeaders(data::stream::InputStreamBufferedProxy* stream, http::HttpError::Info& error)

RequestHeadersReader::readHeadersAsync

Read and parse http headers from stream in asynchronous manner.

  • @param stream - std::shared_ptr to oatpp::data::stream::InputStreamBufferedProxy.
  • @return - oatpp::async::CoroutineStarterForResult.

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

RequestHeadersReader::Result

Result of headers reading and parsing.

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

Fields

Type Name Summary
http::RequestStartingLine startingLine oatpp::web::protocol::http::RequestStartingLine.
http::Headers headers oatpp::web::protocol::http::Headers.

RequestHeadersReader::Result::startingLine

oatpp::web::protocol::http::RequestStartingLine.

http::RequestStartingLine startingLine

RequestHeadersReader::Result::headers

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

http::Headers headers