Sane C++ Libraries
C++ Platform Abstraction Libraries
Loading...
Searching...
No Matches
SC::HttpClientResponse Struct Reference

Parsed response metadata filled when headers arrive. More...

#include <HttpClient.h>

Public Types

enum class  Protocol : uint8_t {
  Unknown ,
  Http11 ,
  Http2
}
 

Public Member Functions

bool getHeader (StringSpan name, StringSpan &value) const
 
bool hasHeader (StringSpan name) const
 
bool findNextHeader (StringSpan name, HttpClientResponseHeaderIterator &iterator, StringSpan &value) const
 
bool getNextHeader (HttpClientResponseHeaderIterator &iterator, HttpClientHeader &header) const
 
bool getContentLength (uint64_t &value) const
 
bool getContentType (StringSpan &value) const
 
bool getContentEncoding (StringSpan &value) const
 
bool getTransferEncoding (StringSpan &value) const
 
bool getLocation (StringSpan &value) const
 
bool getWwwAuthenticate (StringSpan &value) const
 
bool getProxyAuthenticate (StringSpan &value) const
 
bool getNextContentCoding (HttpClientContentCodingIterator &iterator, HttpClientContentCoding &contentCoding) const
 
bool getNextTransferCoding (HttpClientTransferCodingIterator &iterator, HttpClientTransferCoding &transferCoding) const
 
bool hasContentCoding (HttpClientContentCoding::Type type) const
 
bool hasTransferCoding (HttpClientTransferCoding::Type type) const
 
bool isHttp11 () const
 
bool isHttp2 () const
 
bool isInformationalStatus () const
 
bool isSuccessfulStatus () const
 
bool isRedirectStatus () const
 
bool isClientErrorStatus () const
 
bool isServerErrorStatus () const
 
bool isErrorStatus () const
 
const char * getProtocolName () const
 

Static Public Member Functions

static const char * getProtocolName (Protocol protocol)
 

Public Attributes

int statusCode = 0
 HTTP status code (e.g. 200, 404)
 
Span< const char > headers
 
size_t headersLength = 0
 
Protocol negotiatedProtocol = Protocol::Unknown
 
StringSpan effectiveUrl
 
uint32_t redirectCount = 0
 

Detailed Description

Parsed response metadata filled when headers arrive.

headers and effectiveUrl are views into caller-owned HttpClientOperationMemory buffers.

Member Data Documentation

◆ statusCode

int SC::HttpClientResponse::statusCode = 0

HTTP status code (e.g. 200, 404)


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