Molybden API
Loading...
Searching...
No Matches
molybden::ReceiveHeadersArgs Struct Reference

The NetworkDelegates::onReceiveHeaders action arguments. More...

#include <network_delegates.hpp>

Public Attributes

std::shared_ptr< Networknetwork
 The network instance initiated this action.
 
UrlRequest request
 The URL request.
 
std::vector< HttpHeaderhttp_headers
 The list of the HTTP headers of the request or an empty list if the request does not have any HTTP headers.
 
std::string mime_type
 The MIME type value initialized with the lower case string retrieved from the Content-Type header.
 
std::string charset
 Represents the charset data in the lower case retrieved from the Content-Type header.
 
std::string ip_address
 Represents a remote endpoint that was used to make the request.
 
std::string status_line
 Represents the information about HTTP version, response code and the status text.
 
std::string status_text
 Returns a string that represents the short textual description of the response code.
 
int64_t content_length
 The value of the Content-Length header.
 
uint16_t response_code
 Returns the HTTP response code.
 

Detailed Description

The NetworkDelegates::onReceiveHeaders action arguments.

Member Data Documentation

◆ charset

std::string molybden::ReceiveHeadersArgs::charset

Represents the charset data in the lower case retrieved from the Content-Type header.

Can be empty if there is no charset data.

◆ content_length

int64_t molybden::ReceiveHeadersArgs::content_length

The value of the Content-Length header.

The value equals -1 when there is no such HTTP header in the URL response.

◆ ip_address

std::string molybden::ReceiveHeadersArgs::ip_address

Represents a remote endpoint that was used to make the request.

It can be empty if the resource pulled from cache.

◆ mime_type

std::string molybden::ReceiveHeadersArgs::mime_type

The MIME type value initialized with the lower case string retrieved from the Content-Type header.

Can be empty if there is no MIME type data.

◆ response_code

uint16_t molybden::ReceiveHeadersArgs::response_code

Returns the HTTP response code.

This is 0 if the response code text seems to exist, but could not be parsed. Otherwise, it defaults to 200 if the response code is not found in the HTTP headers.


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