HolyLib Wiki

HttpRequest

HttpRequest

This class represents the HttpRequest that is sent out after it was processed

Metatable function Description
__tostring Returns a formated string of the VoiceData -> HttpRequest
__index Used to find the functions on the metatable and access saved variables
__newindex Used to allow one to save variables on the object

Methods

string HttpRequest:GetBody( )
The body of the HTTP Request.
CBaseClient HttpRequest:GetClient( )
Returns the client who sent the HTTP Request or NULL if it didn't find it.
number HttpRequest:GetContentLength( )
The length of the HTTP Request content.
string HttpRequest:GetHeader( string key )
returns the value of the given key from the header.
string HttpRequest:GetLocalAddr( )
number HttpRequest:GetLocalPort( )
string HttpRequest:GetMethod( )
The HTTP Method that was used like GET or PUT.
string HttpRequest:GetParam( string key )
returns the value of the given key from the parameters.
string HttpRequest:GetPathParam( string key )
returns the value of the given key from path parameters.
Player HttpRequest:GetPlayer( )
Returns the player who sent the HTTP Request or NULL if it didn't find it.
string HttpRequest:GetRemoteAddr( )
the IP Address of the Person who sent the HTTP Request
number HttpRequest:GetRemotePort( )
The Port the HTTP request was received from.
table HttpRequest:GetTable( )
Returns the lua table used by newindex and index
boolean HttpRequest:HasHeader( string key )
returns true if the client has the given key in the header.
boolean HttpRequest:HasParam( string key )
returns true if the client has the given key in the parameters.
boolean HttpRequest:IsValid( )
Returns whether this HttpRequest is valid.