| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- #ifndef HTTP_HTTPREPLY_H
- #define HTTP_HTTPREPLY_H
- #include "HttpHeaders.h"
- #include <asio.hpp>
- #include <string>
- #include <vector>
- namespace Http {
- struct HttpReply
- {
- struct Status
- {
- enum type
- {
- Ok = 200,
- Created = 201,
- Accepted = 202,
- NoContent = 204,
- MultipleChoices = 300,
- MovedPermanently = 301,
- MovedTemporarily = 302,
- NotModified = 304,
- BadRequest = 400,
- Unauthorized = 401,
- Forbidden = 403,
- NotFound = 404,
- InternalServerError = 500,
- NotImplemented = 501,
- BadGateway = 502,
- ServiceUnavailable = 503
- };
- };
- Status::type status;
- HttpHeaders headers;
- std::string content;
- std::vector<asio::const_buffer> ToBuffers();
- static HttpReply StockReply(Status::type status);
- };
- } // namespace Http
- #endif // HTTP_HTTPREPLY_H
|