# CurlHeadersReader.hpp

This File On Github
Ask A Question

API: latest
module: oatpp-curl
#include "oatpp-curl/io/CurlHeadersReader.hpp"

# CurlHeadersReader

Curl headers reader is responsible for reading response headers.
It implements CURLOPT_HEADERFUNCTION and stores headers in oatpp::web::protocol::http::Headers. It also captures response oatpp::web::protocol::http::ResponseStartingLine.

namespace oatpp { namespace curl { namespace io { 
  class CurlHeadersReader {}

# Fields

Type Name Summary
v_int32 STATE_INITIALIZED STATE_INITIALIZED state of CurlHeadersReader.
v_int32 STATE_STARTED STATE_STARTED state of CurlHeadersReader.
v_int32 STATE_FINISHED STATE_FINISHED state of CurlHeadersReader.

# Methods

Return Type Name Summary
[none] CurlHeadersReader Constructor.
v_int32 getState State of CurlHeadersReader.
const oatpp::web::protocol::http::ResponseStartingLine& getStartingLine Get response starting line.
const oatpp::web::protocol::http::Headers& getHeaders Get headers map.

# CurlHeadersReader::STATE_INITIALIZED

STATE_INITIALIZED state of CurlHeadersReader.

constexpr static v_int32 STATE_INITIALIZED = 0

# CurlHeadersReader::STATE_STARTED

STATE_STARTED state of CurlHeadersReader.

constexpr static v_int32 STATE_STARTED = 1

# CurlHeadersReader::STATE_FINISHED

STATE_FINISHED state of CurlHeadersReader.

constexpr static v_int32 STATE_FINISHED = 2

# CurlHeadersReader::CurlHeadersReader


CurlHeadersReader(const std::shared_ptr<CurlHandles>& curlHandles)

# CurlHeadersReader::getState

State of CurlHeadersReader.

v_int32 getState() const

# CurlHeadersReader::getStartingLine

Get response starting line.

const oatpp::web::protocol::http::ResponseStartingLine& getStartingLine() const

# CurlHeadersReader::getHeaders

Get headers map.

const oatpp::web::protocol::http::Headers& getHeaders() const