X-Git-Url: https://git.llucax.com/z.facultad/75.42/plaqui.git/blobdiff_plain/cd6078479123cd2cfe62df2d838633c143649edf..f27c218d18ebf7198e07249aca1eed625da914fd:/Server/include/plaqui/server/httprequest.h diff --git a/Server/include/plaqui/server/httprequest.h b/Server/include/plaqui/server/httprequest.h index 0f21452..a5a3647 100644 --- a/Server/include/plaqui/server/httprequest.h +++ b/Server/include/plaqui/server/httprequest.h @@ -28,8 +28,11 @@ #ifndef PLAQUI_HTTPREQUEST_H #define PLAQUI_HTTPREQUEST_H -#include "httpmessage.h" +#include "plaqui/server/httperror.h" +#include "plaqui/server/httpmessage.h" #include +#include +#include namespace PlaQui { @@ -78,9 +81,12 @@ namespace Server { // Atributos. - protected: + protected: // TODO hacer privados con get() y set() ??? + + public: /// Método HTTP. + /// @todo TODO - convertirlo a string? Hace todo más fácil (y más ineficiente :) HTTPMethod method; /// URI. @@ -104,13 +110,13 @@ namespace Server { HTTPRequest(const std::string& uri = "/", const HTTPMethod& method = GET, const std::string& query = "", - const std::string& http = "1.1"); + const std::string& version = "1.1"); /** * Obtiene los datos del pedido HTTP desde un texto. */ - friend std::istream& operator>>(std::istream& is, - const HTTPRequest& req); + friend std::istream& operator>>(std::istream& is, HTTPRequest& req) + throw(HTTPError, std::ios::failure); /** * Convierte el pedido HTTP en texto.