coreHTTP  v2.0.2
HTTP/1.1 Client Library
HTTPParsingContext_t Struct Reference

The HTTP response parsing context for a response fresh from the server. This context is passed into the http-parser registered callbacks. The registered callbacks are private functions of the form httpParserXXXXCallbacks(). More...

#include <core_http_client_private.h>

Data Fields

http_parser httpParser
 
HTTPParsingState_t state
 
HTTPResponse_tpResponse
 
uint8_t isHeadResponse
 
const char * pBufferCur
 
const char * pLastHeaderField
 
size_t lastHeaderFieldLen
 
const char * pLastHeaderValue
 
size_t lastHeaderValueLen
 

Detailed Description

The HTTP response parsing context for a response fresh from the server. This context is passed into the http-parser registered callbacks. The registered callbacks are private functions of the form httpParserXXXXCallbacks().

The transitions of the httpParserXXXXCallback() functions are shown below. The XXXX is replaced by the strings in the state boxes:

+------------------—+ |onMessageBegin | +-----—+---------—+

v +-----—+---------—+ |onStatus | +-----—+---------—+

v +-----—+---------—+ |onHeaderField +<—+ +-----—+---------—+ | | | | |(More headers) | | v | +-----—+---------—+ | |onHeaderValue +-—^ +-----—+---------—+

v +-----—+---------—+ |onHeadersComplete | +------------------—+

v +-----—+---------—+ |onBody +<—+ +-----—+-----—+—+ | | | |(Transfer-encoding chunked body) | | | | +-----—+ | v +-----—+---------—+ |onMessageComplete | +------------------—+

Field Documentation

◆ httpParser

http_parser HTTPParsingContext_t::httpParser

Third-party http-parser context.

◆ state

HTTPParsingState_t HTTPParsingContext_t::state

The current state of the HTTP response parsed.

◆ pResponse

HTTPResponse_t* HTTPParsingContext_t::pResponse

HTTP response associated with this parsing context.

◆ isHeadResponse

uint8_t HTTPParsingContext_t::isHeadResponse

HTTP response is for a HEAD request.

◆ pBufferCur

const char* HTTPParsingContext_t::pBufferCur

The current location of the parser in the response buffer.

◆ pLastHeaderField

const char* HTTPParsingContext_t::pLastHeaderField

Holds the last part of the header field parsed.

◆ lastHeaderFieldLen

size_t HTTPParsingContext_t::lastHeaderFieldLen

The length of the last header field parsed.

◆ pLastHeaderValue

const char* HTTPParsingContext_t::pLastHeaderValue

Holds the last part of the header value parsed.

◆ lastHeaderValueLen

size_t HTTPParsingContext_t::lastHeaderValueLen

The length of the last value field parsed.


The documentation for this struct was generated from the following file: