#include <nawa/request/Env.h>
Accessor for environment variables.
Definition at line 39 of file Env.h.
◆ ~Env()
virtual nawa::request::Env::~Env |
( |
| ) |
|
|
virtual |
◆ Env()
request::Env::Env |
( |
RequestInitContainer const & |
initContainer | ) |
|
|
explicit |
Create Env using a RequestInitContainer.
- Parameters
-
initContainer | The RequestInitContainer. |
Definition at line 42 of file Env.cpp.
◆ operator[]()
string request::Env::operator[] |
( |
std::string const & |
envVar | ) |
const |
Get an environment variable. For a list of environment variables, see Environment
- Parameters
-
envVar | Name of the environment variable. |
- Returns
- Content of the environment variable. Empty string if not set.
Definition at line 46 of file Env.cpp.
◆ getAcceptLanguages()
vector< string > request::Env::getAcceptLanguages |
( |
| ) |
const |
Receive the languages accepted by the client (from HTTP Header). Works with fastcgi request handler only.
- Returns
- Vector of strings containing the accepted languages. Empty if not set.
- Deprecated:
- Please use ["accept-language"] instead to access the header directly.
Definition at line 53 of file Env.cpp.
◆ getRequestPath()
vector< 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 57 of file Env.cpp.
The documentation for this class was generated from the following files: