2.9.16
Coherent GT
A modern user interface library for games
Coherent::UIGT::ResourceRequestUIGT Class Referenceabstract

Represents a single URL request (read-only) Allows monitoring of URL requests. More...

#include <Coherent/Coherent/UIGT/ResourceRequestUIGT.h>

Public Member Functions

virtual const char * GetURL () const =0
 Get the URL of the request. More...
 
virtual const char * GetMethod () const =0
 Get the method of the request. More...
 
virtual const char * GetReferrer () const =0
 Get the referrer of the request. More...
 
virtual const char * GetHeader (const char *field) const =0
 Get header value. More...
 
virtual int GetHeaderIndex (const char *field) const =0
 Get header value. More...
 
virtual bool HasHeader (const char *field) const =0
 Checks if a header with the specified key is present in the headers collection. More...
 
virtual const HTTPHeaderGetHeaders () const =0
 Get headers. More...
 
virtual unsigned int GetHeadersCount () const =0
 Get headers count. More...
 
virtual void SetHeader (const char *key, const char *value)=0
 Sets the header for the specified key. If the key doesn't exist, a new header will be added. More...
 
virtual void RemoveHeader (const char *key)=0
 Remove a header if exist. More...
 

Detailed Description

Represents a single URL request (read-only) Allows monitoring of URL requests.

Member Function Documentation

◆ GetHeader()

virtual const char* Coherent::UIGT::ResourceRequestUIGT::GetHeader ( const char *  field) const
pure virtual

Get header value.

Parameters
fieldfield of the header
Returns
the value of the header or nullptr if there is such header in the request

◆ GetHeaderIndex()

virtual int Coherent::UIGT::ResourceRequestUIGT::GetHeaderIndex ( const char *  field) const
pure virtual

Get header value.

Parameters
fieldfield of the header
Returns
the index of the header with the specified key in the headers collection, or a negative number if no such key exists

◆ GetHeaders()

virtual const HTTPHeader* Coherent::UIGT::ResourceRequestUIGT::GetHeaders ( ) const
pure virtual

Get headers.

Returns
pointer to the first header of the request

◆ GetHeadersCount()

virtual unsigned int Coherent::UIGT::ResourceRequestUIGT::GetHeadersCount ( ) const
pure virtual

Get headers count.

Returns
the number of headers in the request

◆ GetMethod()

virtual const char* Coherent::UIGT::ResourceRequestUIGT::GetMethod ( ) const
pure virtual

Get the method of the request.

Returns
the method as a string

◆ GetReferrer()

virtual const char* Coherent::UIGT::ResourceRequestUIGT::GetReferrer ( ) const
pure virtual

Get the referrer of the request.

Returns
the referrer of the request

◆ GetURL()

virtual const char* Coherent::UIGT::ResourceRequestUIGT::GetURL ( ) const
pure virtual

Get the URL of the request.

Returns
the URL of the request

◆ HasHeader()

virtual bool Coherent::UIGT::ResourceRequestUIGT::HasHeader ( const char *  field) const
pure virtual

Checks if a header with the specified key is present in the headers collection.

Parameters
fieldfield of the header
Returns
true if a header with the specified key is present, false otherwise

◆ RemoveHeader()

virtual void Coherent::UIGT::ResourceRequestUIGT::RemoveHeader ( const char *  key)
pure virtual

Remove a header if exist.

Parameters
keyit is the name of the header

◆ SetHeader()

virtual void Coherent::UIGT::ResourceRequestUIGT::SetHeader ( const char *  key,
const char *  value 
)
pure virtual

Sets the header for the specified key. If the key doesn't exist, a new header will be added.

Parameters
keyit is the name of the header
valueit is the value of the header