asio 0.3.7 Home | Reference | Tutorial | Examples | Design
Examples

http::server::status_strings Namespace Reference


Functions

asio::const_buffer to_buffer (reply::status_type status)

Variables

const std::string ok
const std::string created
const std::string accepted
const std::string no_content
const std::string multiple_choices
const std::string moved_permanently
const std::string moved_temporarily
const std::string not_modified
const std::string bad_request
const std::string unauthorized
const std::string forbidden
const std::string not_found
const std::string internal_server_error
const std::string not_implemented
const std::string bad_gateway
const std::string service_unavailable


Function Documentation

asio::const_buffer http::server::status_strings::to_buffer ( reply::status_type  status  ) 

Definition at line 43 of file reply.cpp.

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

00044 {
00045   switch (status)
00046   {
00047   case reply::ok:
00048     return asio::buffer(ok);
00049   case reply::created:
00050     return asio::buffer(created);
00051   case reply::accepted:
00052     return asio::buffer(accepted);
00053   case reply::no_content:
00054     return asio::buffer(no_content);
00055   case reply::multiple_choices:
00056     return asio::buffer(multiple_choices);
00057   case reply::moved_permanently:
00058     return asio::buffer(moved_permanently);
00059   case reply::moved_temporarily:
00060     return asio::buffer(moved_temporarily);
00061   case reply::not_modified:
00062     return asio::buffer(not_modified);
00063   case reply::bad_request:
00064     return asio::buffer(bad_request);
00065   case reply::unauthorized:
00066     return asio::buffer(unauthorized);
00067   case reply::forbidden:
00068     return asio::buffer(forbidden);
00069   case reply::not_found:
00070     return asio::buffer(not_found);
00071   case reply::internal_server_error:
00072     return asio::buffer(internal_server_error);
00073   case reply::not_implemented:
00074     return asio::buffer(not_implemented);
00075   case reply::bad_gateway:
00076     return asio::buffer(bad_gateway);
00077   case reply::service_unavailable:
00078     return asio::buffer(service_unavailable);
00079   default:
00080     return asio::buffer(internal_server_error);
00081   }
00082 }


Variable Documentation

const std::string http::server::status_strings::ok

Initial value:

  "HTTP/1.0 200 OK\r\n"

Definition at line 10 of file reply.cpp.

Referenced by to_buffer().

const std::string http::server::status_strings::created

Initial value:

  "HTTP/1.0 201 Created\r\n"

Definition at line 12 of file reply.cpp.

Referenced by to_buffer().

const std::string http::server::status_strings::accepted

Initial value:

  "HTTP/1.0 202 Accepted\r\n"

Definition at line 14 of file reply.cpp.

Referenced by to_buffer().

const std::string http::server::status_strings::no_content

Initial value:

  "HTTP/1.0 204 No Content\r\n"

Definition at line 16 of file reply.cpp.

Referenced by to_buffer().

const std::string http::server::status_strings::multiple_choices

Initial value:

  "HTTP/1.0 300 Multiple Choices\r\n"

Definition at line 18 of file reply.cpp.

Referenced by to_buffer().

const std::string http::server::status_strings::moved_permanently

Initial value:

  "HTTP/1.0 301 Moved Permanently\r\n"

Definition at line 20 of file reply.cpp.

Referenced by to_buffer().

const std::string http::server::status_strings::moved_temporarily

Initial value:

  "HTTP/1.0 302 Moved Temporarily\r\n"

Definition at line 22 of file reply.cpp.

Referenced by to_buffer().

const std::string http::server::status_strings::not_modified

Initial value:

  "HTTP/1.0 304 Not Modified\r\n"

Definition at line 24 of file reply.cpp.

Referenced by to_buffer().

const std::string http::server::status_strings::bad_request

Initial value:

  "HTTP/1.0 400 Bad Request\r\n"

Definition at line 26 of file reply.cpp.

Referenced by to_buffer().

const std::string http::server::status_strings::unauthorized

Initial value:

  "HTTP/1.0 401 Unauthorized\r\n"

Definition at line 28 of file reply.cpp.

Referenced by to_buffer().

const std::string http::server::status_strings::forbidden

Initial value:

  "HTTP/1.0 403 Forbidden\r\n"

Definition at line 30 of file reply.cpp.

Referenced by to_buffer().

const std::string http::server::status_strings::not_found

Initial value:

  "HTTP/1.0 404 Not Found\r\n"

Definition at line 32 of file reply.cpp.

Referenced by to_buffer().

const std::string http::server::status_strings::internal_server_error

Initial value:

  "HTTP/1.0 500 Internal Server Error\r\n"

Definition at line 34 of file reply.cpp.

Referenced by to_buffer().

const std::string http::server::status_strings::not_implemented

Initial value:

  "HTTP/1.0 501 Not Implemented\r\n"

Definition at line 36 of file reply.cpp.

Referenced by to_buffer().

const std::string http::server::status_strings::bad_gateway

Initial value:

  "HTTP/1.0 502 Bad Gateway\r\n"

Definition at line 38 of file reply.cpp.

Referenced by to_buffer().

const std::string http::server::status_strings::service_unavailable

Initial value:

  "HTTP/1.0 503 Service Unavailable\r\n"

Definition at line 40 of file reply.cpp.

Referenced by to_buffer().

asio 0.3.7 Home | Reference | Tutorial | Examples | Design