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

Incoming message from the perspective of the participants of an HTTP transaction. More...

#include <HttpConnection.h>

Public Member Functions

const HttpParsergetParser () const
 Gets the associated HttpParser.
 
StringSpan getURL () const
 Gets the request URL.
 
bool isMultipart () const
 Checks if the request is a multipart/form-data request.
 
StringSpan getBoundary () const
 Gets the multipart boundary string (if isMultipart() returns true)
 
bool getHeader (StringSpan headerName, StringSpan &value) const
 Gets the value of a specific header (case-insensitive name matching)
 
void reset ()
 Resets this object for it to be re-usable.
 

Friends

struct HttpConnectionsPool
 
struct HttpResponse
 
struct HttpAsyncServer
 

Detailed Description

Incoming message from the perspective of the participants of an HTTP transaction.

Member Function Documentation

◆ getBoundary()

StringSpan SC::HttpRequest::getBoundary ( ) const
nodiscard

Gets the multipart boundary string (if isMultipart() returns true)

◆ getHeader()

bool SC::HttpRequest::getHeader ( StringSpan headerName,
StringSpan & value ) const
nodiscard

Gets the value of a specific header (case-insensitive name matching)

Parameters
headerNameThe name of the header to find
valueOutput parameter that receives the header value if found
Returns
true if the header was found

◆ getParser()

const HttpParser & SC::HttpRequest::getParser ( ) const
inline

Gets the associated HttpParser.

◆ getURL()

StringSpan SC::HttpRequest::getURL ( ) const
inline

Gets the request URL.

◆ isMultipart()

bool SC::HttpRequest::isMultipart ( ) const
nodiscard

Checks if the request is a multipart/form-data request.

◆ reset()

void SC::HttpRequest::reset ( )

Resets this object for it to be re-usable.


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