| Home | Libraries | People | FAQ | More

# http::server::stock_replies Namespace Reference

## Functions

std::string | to_string (reply::status_type status)

## Variables

const char | ok [] = ""
const char | created []
const char | accepted []
const char | no_content []
const char | multiple_choices []
const char | moved_permanently []
const char | moved_temporarily []
const char | not_modified []
const char | bad_request []
const char | unauthorized []
const char | forbidden []
const char | not_found []
const char | internal_server_error []
const char | not_implemented []
const char | bad_gateway []
const char | service_unavailable []

## Function Documentation

std::string http::server::stock_replies::to_string | ( | reply::status_type | status | ) |

Definition at line 189 of file reply.cpp.

Referenced by http::server::reply::stock_reply().

    00190 {
    00191   switch (status)
    00192   {
    00193   case reply::ok:
    00194     return ok;
    00195   case reply::created:
    00196     return created;
    00197   case reply::accepted:
    00198     return accepted;
    00199   case reply::no_content:
    00200     return no_content;
    00201   case reply::multiple_choices:
    00202     return multiple_choices;
    00203   case reply::moved_permanently:
    00204     return moved_permanently;
    00205   case reply::moved_temporarily:
    00206     return moved_temporarily;
    00207   case reply::not_modified:
    00208     return not_modified;
    00209   case reply::bad_request:
    00210     return bad_request;
    00211   case reply::unauthorized:
    00212     return unauthorized;
    00213   case reply::forbidden:
    00214     return forbidden;
    00215   case reply::not_found:
    00216     return not_found;
    00217   case reply::internal_server_error:
    00218     return internal_server_error;
    00219   case reply::not_implemented:
    00220     return not_implemented;
    00221   case reply::bad_gateway:
    00222     return bad_gateway;
    00223   case reply::service_unavailable:
    00224     return service_unavailable;
    00225   default:
    00226     return internal_server_error;
    00227   }
    00228 }

## Variable Documentation

const char http::server::stock_replies::ok[] = ""

Definition at line 112 of file reply.cpp.

Referenced by to_string().

const char http::server::stock_replies::created[]

Initial value:

      "<html>"
      "<head><title>Created</title></head>"
      "<body><h1>201 Created</h1></body>"
      "</html>"

Definition at line 113 of file reply.cpp.

Referenced by to_string().

const char http::server::stock_replies::accepted[]

Initial value:

      "<html>"
      "<head><title>Accepted</title></head>"
      "<body><h1>202 Accepted</h1></body>"
      "</html>"

Definition at line 118 of file reply.cpp.

Referenced by to_string().

const char http::server::stock_replies::no_content[]

Initial value:

      "<html>"
      "<head><title>No Content</title></head>"
      "<body><h1>204 Content</h1></body>"
      "</html>"

Definition at line 123 of file reply.cpp.

Referenced by to_string().

const char http::server::stock_replies::multiple_choices[]

Initial value:

      "<html>"
      "<head><title>Multiple Choices</title></head>"
      "<body><h1>300 Multiple Choices</h1></body>"
      "</html>"

Definition at line 128 of file reply.cpp.

Referenced by to_string().

const char http::server::stock_replies::moved_permanently[]

Initial value:

      "<html>"
      "<head><title>Moved Permanently</title></head>"
      "<body><h1>301 Moved Permanently</h1></body>"
      "</html>"

Definition at line 133 of file reply.cpp.

Referenced by to_string().

const char http::server::stock_replies::moved_temporarily[]

Initial value:

      "<html>"
      "<head><title>Moved Temporarily</title></head>"
      "<body><h1>302 Moved Temporarily</h1></body>"
      "</html>"

Definition at line 138 of file reply.cpp.

Referenced by to_string().

const char http::server::stock_replies::not_modified[]

Initial value:

      "<html>"
      "<head><title>Not Modified</title></head>"
      "<body><h1>304 Not Modified</h1></body>"
      "</html>"

Definition at line 143 of file reply.cpp.

Referenced by to_string().

const char http::server::stock_replies::bad_request[]

Initial value:

      "<html>"
      "<head><title>Bad Request</title></head>"
      "<body><h1>400 Bad Request</h1></body>"
      "</html>"

Definition at line 148 of file reply.cpp.

Referenced by to_string().

const char http::server::stock_replies::unauthorized[]

Initial value:

      "<html>"
      "<head><title>Unauthorized</title></head>"
      "<body><h1>401 Unauthorized</h1></body>"
      "</html>"

Definition at line 153 of file reply.cpp.

Referenced by to_string().

const char http::server::stock_replies::forbidden[]

Initial value:

      "<html>"
      "<head><title>Forbidden</title></head>"
      "<body><h1>403 Forbidden</h1></body>"
      "</html>"

Definition at line 158 of file reply.cpp.

Referenced by to_string().

const char http::server::stock_replies::not_found[]

Initial value:

      "<html>"
      "<head><title>Not Found</title></head>"
      "<body><h1>404 Not Found</h1></body>"
      "</html>"

Definition at line 163 of file reply.cpp.

Referenced by to_string().

const char http::server::stock_replies::internal_server_error[]

Initial value:

      "<html>"
      "<head><title>Internal Server Error</title></head>"
      "<body><h1>500 Internal Server Error</h1></body>"
      "</html>"

Definition at line 168 of file reply.cpp.

Referenced by to_string().

const char http::server::stock_replies::not_implemented[]

Initial value:

      "<html>"
      "<head><title>Not Implemented</title></head>"
      "<body><h1>501 Not Implemented</h1></body>"
      "</html>"

Definition at line 173 of file reply.cpp.

Referenced by to_string().

const char http::server::stock_replies::bad_gateway[]

Initial value:

      "<html>"
      "<head><title>Bad Gateway</title></head>"
      "<body><h1>502 Bad Gateway</h1></body>"
      "</html>"

Definition at line 178 of file reply.cpp.

Referenced by to_string().

const char http::server::stock_replies::service_unavailable[]

Initial value:

      "<html>"
      "<head><title>Service Unavailable</title></head>"
      "<body><h1>503 Service Unavailable</h1></body>"
      "</html>"

Definition at line 183 of file reply.cpp.

Referenced by to_string().

| Copyright © 2003 - 2006 Christopher M. Kohlhoff