#include <http_io.hpp>
|
void | get_env (char *env_p[]) |
|
| http_io () |
|
void | print_env (ostream &o_stream) |
|
void | respond (ostringstream &o_stream, int status=200, string mime="text/plain", string charset="utf-8") |
|
◆ http_io()
Class to handle basic web server CGI input/output and shell environment tasks.
◆ get_env()
void http_io::get_env |
( |
char * |
env_p[] | ) |
|
Parses the web server CGI shell environment into http_io::env. Puts the HTTP message body into http_io::env["body"].
- Parameters
-
env_p | The CGI shell environment passed into the third argument to main(). |
◆ print_env()
void http_io::print_env |
( |
ostream & |
o_stream | ) |
|
Dump http_io::env to a stream.
- Parameters
-
o_stream | The stream to print the output to; stdout or a file typically. |
◆ respond()
void http_io::respond |
( |
ostringstream & |
o_stream, |
|
|
int |
status = 200 , |
|
|
string |
mime = "text/plain" , |
|
|
string |
charset = "utf-8" |
|
) |
| |
Send an HTTP response to an HTTP query.
- Parameters
-
o_stream | The stream to print the output to.. |
status | The HTTP Status code |
- See also
- http_io::http_status
- Parameters
-
mime | The HTTP Content-Type |
charset | The character set |
◆ content_type_parser
const string http_io::content_type_parser = R"END(^(.*?);\s(.*)$)END" |
|
private |
◆ content_type_regex
◆ env
map<string, string> http_io::env |
◆ header
map<string, string> http_io::header |
◆ http_status
map<int, string> http_io::http_status |
◆ https
bool http_io::https {false} |
◆ locale
◆ su
The documentation for this class was generated from the following files: