NAWA 0.9
Web Application Framework for C++
nawa::request::Env Class Reference

#include <nawa/request/Env.h>

Public Member Functions

virtual ~Env ()
 
 Env (RequestInitContainer const &initContainer)
 
std::string operator[] (std::string const &envVar) const
 
std::vector< std::string > getRequestPath () const
 

Detailed Description

Accessor for environment variables.

Definition at line 39 of file Env.h.

Constructor & Destructor Documentation

◆ ~Env()

virtual nawa::request::Env::~Env ( )
virtual

◆ Env()

request::Env::Env ( RequestInitContainer const &  initContainer)
explicit

Create Env using a RequestInitContainer.

Parameters
initContainerThe RequestInitContainer.

Definition at line 40 of file Env.cpp.

Member Function Documentation

◆ operator[]()

std::string request::Env::operator[] ( std::string const &  envVar) const

Get an environment variable. For a list of environment variables, see Environment

Parameters
envVarName of the environment variable.
Returns
Content of the environment variable. Empty string if not set.

Definition at line 44 of file Env.cpp.

◆ getRequestPath()

std::vector< std::string > request::Env::getRequestPath ( ) const

Request path. Use ["REQUEST_URI"] to access it as a string.

Returns
Vector of strings containing the elements of the path.

Definition at line 51 of file Env.cpp.


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