VoltMod
C++23 framework for CS2 server plugins
Loading...
Searching...
No Matches
VoltMod::HttpRequest Struct Reference

#include <HttpClient.hpp>

Public Member Functions

void AddAuth (std::string_view header, std::string_view scheme, std::string_view key)
 

Public Attributes

HttpMethod Method = HttpMethod::Get
 
std::string Url
 
std::string Body
 
HttpHeaders Headers
 
long TimeoutMs = 8000
 

Detailed Description

Definition at line 41 of file HttpClient.hpp.

Member Function Documentation

◆ AddAuth()

void VoltMod::HttpRequest::AddAuth ( std::string_view  header,
std::string_view  scheme,
std::string_view  key 
)
inline

Add a credential header, e.g. AddAuth("Authorization", "Bearer", key); an empty scheme sends key alone, and an empty key adds nothing.

Definition at line 51 of file HttpClient.hpp.

References Headers, and VoltMod::ReadFile().

Member Data Documentation

◆ Body

std::string VoltMod::HttpRequest::Body

Definition at line 45 of file HttpClient.hpp.

◆ Headers

HttpHeaders VoltMod::HttpRequest::Headers

Definition at line 46 of file HttpClient.hpp.

Referenced by AddAuth().

◆ Method

HttpMethod VoltMod::HttpRequest::Method = HttpMethod::Get

Definition at line 43 of file HttpClient.hpp.

◆ TimeoutMs

long VoltMod::HttpRequest::TimeoutMs = 8000

Definition at line 47 of file HttpClient.hpp.

◆ Url

std::string VoltMod::HttpRequest::Url

Definition at line 44 of file HttpClient.hpp.


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