Coherent UI  2.5.3
A modern user interface library for games
 All Classes Namespaces Functions Variables Enumerations Enumerator Pages
Coherent::UI::URLRequest Class Referenceabstract

represents a single URL request Allows monitoring and modifications of URL requests More...

#include <Coherent/UI/URLRequest.h>

+ Inheritance diagram for Coherent::UI::URLRequest:

Public Member Functions

virtual void SetURL (const wchar_t *url)=0
 Replace the URL of the request.
 
virtual void SetMethod (const char *method)=0
 Set the method of the request. More...
 
virtual void SetReferrer (const wchar_t *referrer)=0
 Set the referrer of the request. More...
 
virtual void SetExtraHeader (const char *field, const char *content)=0
 Set extra header for the request. If there is already a header with that field name its content will be replaced. More...
 
virtual void AppendExtraHeaderValue (const char *field, const char *content)=0
 Append extra header for the request. If there is already a header with that field name the content will be appended to the header current content with a comma as a separator between the values. If there is not such header it will be added. More...
 
virtual void RemoveExtraHeader (const char *field)=0
 Remove extra header from the request. More...
 
virtual void SetExtraHeaders (const HTTPHeader *headers, unsigned int count)=0
 Set the extra headers. More...
 
virtual void Deny ()=0
 Deny the request.
 
- Public Member Functions inherited from Coherent::UI::URLRequestBase
virtual const wchar_t * 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 wchar_t * GetReferrer () const =0
 Get the referrer of the request. More...
 
virtual const char * GetExtraHeader (const char *field) const =0
 Get extra header value. More...
 
virtual int GetExtraHeaderIndex (const char *field) const =0
 Get extra header value. More...
 
virtual bool HasExtraHeader (const char *field) const =0
 Checks if a header with the specified key is present in the headers collection. More...
 
virtual const HTTPHeaderGetExtraHeaders () const =0
 Get extra headers. More...
 
virtual unsigned int GetExtraHeadersCount () const =0
 Get extra headers count. More...
 

Detailed Description

represents a single URL request Allows monitoring and modifications of URL requests

Member Function Documentation

virtual void Coherent::UI::URLRequest::AppendExtraHeaderValue ( const char *  field,
const char *  content 
)
pure virtual

Append extra header for the request. If there is already a header with that field name the content will be appended to the header current content with a comma as a separator between the values. If there is not such header it will be added.

Parameters
fieldname of the header
contentcontent of the header
Note
the header content must be properly encoded
Warning
AppendExtraHeaderValue invalidates any pointers returned by GetExtraHeader and GetExtraHeaders
virtual void Coherent::UI::URLRequest::RemoveExtraHeader ( const char *  field)
pure virtual

Remove extra header from the request.

Parameters
fieldfield of the header to be removed
Warning
RemoveExtraHeader invalidates any pointers returned by GetExtraHeader and GetExtraHeaders
virtual void Coherent::UI::URLRequest::SetExtraHeader ( const char *  field,
const char *  content 
)
pure virtual

Set extra header for the request. If there is already a header with that field name its content will be replaced.

Parameters
fieldname of the header
contentnew content of the header
Note
the header content must be properly encoded
Warning
SetExtraHeader invalidates any pointers returned by GetExtraHeader and GetExtraHeaders
virtual void Coherent::UI::URLRequest::SetExtraHeaders ( const HTTPHeader headers,
unsigned int  count 
)
pure virtual

Set the extra headers.

Parameters
headersthe array of new headers
countthe count of headers in the array
Warning
SetExtraHeaders resets all previous modifications of SetExtraHeader and RemoveExtraHeader
RemoveExtraHeader invalidates any pointers returned by GetExtraHeader and GetExtraHeaders
virtual void Coherent::UI::URLRequest::SetMethod ( const char *  method)
pure virtual

Set the method of the request.

Parameters
methodthe new method as string. method must be a valid HTTP method name
Warning
SetMethod invalidates any pointers returned by GetMethod
virtual void Coherent::UI::URLRequest::SetReferrer ( const wchar_t *  referrer)
pure virtual

Set the referrer of the request.

Parameters
referrerthe new referrer URL for the request
Warning
SetReferrer invalidates any pointers returned by GetReferrer