Man page - rudecgi(3)
Packages contains this manual
Manual
rudecgi
NAMESYNOPSIS
DESCRIPTION
EXAMPLES
SEE ALSO
REPORTING PROBLEMS
AUTHORS
NAME
rudecgi - access formdata in CGI applications
SYNOPSIS
#include <rude/cgi.h>
rude::CGI CGI();
static void finish();
static const char *version();
static void setPathDelimiter(char delimiter );
static void addPathMapName(const char * pathname );
static void setPathMapVoid(const char * emptyname );
static void parsePathMap(bool shouldParse );
static void parsePath(bool shouldParse );
static void parseCookies(bool shouldParse );
static void maxPostLength(long bytes );
void setCaseSensitive(bool isCaseSensitive );
int numValues() const;
int numValues(const char * fieldname ) const;
const char *fieldnameAt(int position ) const;
bool exists(const char * fieldname ) const;
bool isFile(int index ) const;
bool isFile(const char * fieldname ) const;
bool isFile(const char * fieldname , int position );
const char *datasource(int index ) const;
const char *datasource(const char * fieldname ) const;
const char *datasource(const char * fieldname , int position ) const;
const char * operator[](const char * fieldname );
const char * operator[](int x );
const char *value(int index ) const;
const char *value(const char * fieldname ) const;
const char *value(const char * fieldname , int position ) const;
const char *length(int index ) const;
const char *length(const char * fieldname ) const;
const char *length(const char * fieldname , int position ) const;
const char *contenttype(int index ) const;
const char *contenttype(const char * fieldname ) const;
const char *contenttype(const char * fieldname , int position ) const;
const char *filename(int index ) const;
const char *filename(const char * fieldname ) const;
const char *filename(const char * fieldname , int position ) const;
const char *filepath(int index ) const;
const char *filepath(const char * fieldname ) const;
const char *filepath(const char * fieldname , int position ) const;
std::ostream& operator<<(std::ostream& os ,const CGI& cgi );
DESCRIPTION
The RudeCGI library is used to access formdata within C++ CGI applications.
EXAMPLES
Examples, how-toβs and tutorials can also be found at the rudeserver.com website
Basic Usage
#include <rude/cgi.h> #include <iostream>
using namespace std; using namespace rude;
int main(void) {
// Obtain the cgi instance
//
CGI cgi;
// Print out
standard CGI HTTP Response header
//
cout << "Content-Type: text/html0;
// Print out
HTML
//
cout << "<html><body>"
<< "You selected the color: " ;
// use the cgi
object to obtain form data
//
cout << cgi["color"];
cout << "</body></html>";
return 0; }