xmltooling  1.4.2
xmltooling::HTTPRequest Class Referenceabstract

Interface to HTTP requests. More...

#include <xmltooling/io/HTTPRequest.h>

Inheritance diagram for xmltooling::HTTPRequest:
Collaboration diagram for xmltooling::HTTPRequest:

Public Member Functions

bool isSecure () const
 Returns true iff the request is over a confidential channel. More...
 
virtual const char * getMethod () const =0
 Returns the HTTP method of the request (GET, POST, etc.) More...
 
virtual const char * getRequestURI () const =0
 Returns the request URI. More...
 
virtual const char * getRequestURL () const =0
 Returns the complete request URL, including scheme, host, port, and URI. More...
 
virtual const char * getQueryString () const =0
 Returns the HTTP query string appened to the request. More...
 
virtual std::string getHeader (const char *name) const =0
 Returns a request header value. More...
 
virtual const char * getCookie (const char *name) const
 Get a cookie value supplied by the client. More...
 
- Public Member Functions inherited from xmltooling::GenericRequest
virtual const char * getScheme () const =0
 Returns the URL scheme of the request (http, https, ftp, ldap, etc.) More...
 
virtual const char * getHostname () const =0
 Returns hostname of service that received request. More...
 
virtual int getPort () const =0
 Returns incoming port. More...
 
virtual std::string getContentType () const =0
 Returns the MIME type of the request, if known. More...
 
virtual long getContentLength () const =0
 Returns the length of the request body, if known. More...
 
virtual const char * getRequestBody () const =0
 Returns the raw request body. More...
 
virtual const char * getParameter (const char *name) const =0
 Returns a decoded named parameter value from the request. More...
 
virtual std::vector< const
char * >::size_type 
getParameters (const char *name, std::vector< const char * > &values) const =0
 Returns all of the decoded values of a named parameter from the request. More...
 
virtual std::string getRemoteUser () const =0
 Returns the transport-authenticated identity associated with the request, if authentication is solely handled by the transport. More...
 
virtual std::string getAuthType () const
 Gets the authentication type associated with the request. More...
 
virtual std::string getRemoteAddr () const =0
 Returns the IP address of the client. More...
 
virtual const std::vector
< XSECCryptoX509 * > & 
getClientCertificates () const =0
 Returns the chain of certificates sent by the client. More...
 

Detailed Description

Interface to HTTP requests.

To supply information from the surrounding web server environment, a shim must be supplied in the form of this interface to adapt the library to different proprietary server APIs.

This interface need not be threadsafe.

Member Function Documentation

virtual const char* xmltooling::HTTPRequest::getCookie ( const char *  name) const
virtual

Get a cookie value supplied by the client.

Parameters
namename of cookie
Returns
cookie value or nullptr
virtual std::string xmltooling::HTTPRequest::getHeader ( const char *  name) const
pure virtual

Returns a request header value.

Parameters
namethe name of the header to return
Returns
the header's value, or an empty string
virtual const char* xmltooling::HTTPRequest::getMethod ( ) const
pure virtual

Returns the HTTP method of the request (GET, POST, etc.)

Returns
the HTTP method
virtual const char* xmltooling::HTTPRequest::getQueryString ( ) const
pure virtual

Returns the HTTP query string appened to the request.

The query string is returned without any decoding applied, everything found after the ? delimiter.

Returns
the query string
virtual const char* xmltooling::HTTPRequest::getRequestURI ( ) const
pure virtual

Returns the request URI.

Returns
the request URI
virtual const char* xmltooling::HTTPRequest::getRequestURL ( ) const
pure virtual

Returns the complete request URL, including scheme, host, port, and URI.

Returns
the request URL
bool xmltooling::HTTPRequest::isSecure ( ) const
virtual

Returns true iff the request is over a confidential channel.

Returns
confidential channel indicator

Implements xmltooling::GenericRequest.


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