]> git.llucax.com Git - z.facultad/75.42/plaqui.git/blobdiff - Server/include/plaqui/server/httprequest.h
- Se agrega el método HTTPRequest::method_str() para obtener el método como un
[z.facultad/75.42/plaqui.git] / Server / include / plaqui / server / httprequest.h
index ace04f077d8f1bb62d90b2b17f6033cf2e5099af..5056d15cfe8ee68f59465d1f5165cb568ca6ca8f 100644 (file)
@@ -28,7 +28,8 @@
 #ifndef PLAQUI_HTTPREQUEST_H
 #define PLAQUI_HTTPREQUEST_H
 
-#include "httpmessage.h"
+#include "plaqui/server/httperror.h"
+#include "plaqui/server/httpmessage.h"
 #include <string>
 #include <istream>
 #include <ostream>
@@ -109,12 +110,19 @@ namespace Server {
                        HTTPRequest(const std::string& uri = "/",
                                        const HTTPMethod& method = GET,
                                        const std::string& query = "",
+                                       const std::string& body = "",
                                        const std::string& version = "1.1");
 
+                       /**
+                        * Obtiene el método como un string.
+                        */
+                       std::string method_str(void) const;
+
                        /**
                         * Obtiene los datos del pedido HTTP desde un texto.
                         */
-                       friend std::istream& operator>>(std::istream& is, HTTPRequest& req);
+                       friend std::istream& operator>>(std::istream& is, HTTPRequest& req)
+                               throw(HTTPError, std::ios::failure);
 
                        /**
                         * Convierte el pedido HTTP en texto.