ofxHTTP
A collection of tools for HTTP.
ofx::HTTP::FileSystemRouteSettings Class Reference
Inheritance diagram for ofx::HTTP::FileSystemRouteSettings:
ofx::HTTP::BaseRouteSettings

Public Member Functions

 FileSystemRouteSettings (const std::string &routePathPattern=DEFAULT_ROUTE_PATH_PATTERN, bool requireSecurePort=false, bool requireAuthentication=false)
 
void setDefaultIndex (const std::string &defaultIndex)
 
const std::string & getDefaultIndex () const
 
void setDocumentRoot (const std::string &documentRoot)
 
const std::string & getDocumentRoot () const
 
void setAutoCreateDocumentRoot (bool autoCreateDocumentRoot)
 
bool getAutoCreateDocumentRoot () const
 
void setRequireDocumentRootInDataFolder (bool requireDocumentRootInDataFolder)
 
bool getRequireDocumentRootInDataFolder () const
 
- Public Member Functions inherited from ofx::HTTP::BaseRouteSettings
 BaseRouteSettings (const std::string &routePathPattern=BaseRouteSettings::DEFAULT_ROUTE_PATH_PATTERN, bool requireSecurePort=false, bool requireAuthentication=false, const HTTPMethodSet &validHTTPMethods=HTTPMethodSet())
 Create the BaseRouteSettings with the given route path. More...
 
virtual ~BaseRouteSettings ()
 Destroy the BaseRoutSettings.
 
void setRoutePathPattern (const std::string &routePathPattern)
 Set the route path regex pattern. More...
 
const std::string & getRoutePathPattern () const
 
void setRequireSecurePort (bool requireSecurePort)
 Set the secure port requirement. More...
 
bool requireSecurePort () const
 
void setRequireAuthentication (bool requireAuthentication)
 Set the authentication requirement. More...
 
bool requireAuthentication () const
 
void setValidHTTPMethods (const HTTPMethodSet &validHTTPMethods)
 Set the list of valid HTTPMethods. More...
 
const HTTPMethodSetgetValidHTTPMethods () const
 
void setValidContentTypes (const MediaTypeSet &validContentTypes)
 Set the list of valid Content Types. More...
 
const MediaTypeSetgetValidContentTypes () const
 

Static Public Attributes

static const std::string DEFAULT_DOCUMENT_ROOT = "DocumentRoot/"
 
static const std::string DEFAULT_INDEX = "index.html"
 
static const std::string DEFAULT_GET_HTTP_METHODS_ARRAY [] = { "GET" }
 An unfortunate compromise until C++11. More...
 
static const HTTPMethodSet DEFAULT_GET_HTTP_METHODS
 The default HTTP methods for this route.
 
- Static Public Attributes inherited from ofx::HTTP::BaseRouteSettings
static const std::string DEFAULT_ROUTE_PATH_PATTERN = "/.*"
 The default route path regex pattern. More...
 

Additional Inherited Members

- Public Types inherited from ofx::HTTP::BaseRouteSettings
typedef std::set< std::string > HTTPMethodSet
 A typedef for HTTPMethodSet.
 
typedef std::set< std::string > MediaTypeSet
 A typedef for a MediaTypeSet.
 

Member Data Documentation

◆ DEFAULT_GET_HTTP_METHODS_ARRAY

const std::string ofx::HTTP::FileSystemRouteSettings::DEFAULT_GET_HTTP_METHODS_ARRAY = { "GET" }
static

An unfortunate compromise until C++11.

Note
C++ is not able to initialize static collections until after C++11. This is a compromise until then.

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