#include "plaqui/server/httperror.h"
#include "plaqui/server/httpmessage.h"
+#include <socket++/sockstream.h>
#include <string>
#include <istream>
#include <ostream>
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)
- throw(HTTPError, std::ios::failure);
+ throw(HTTPError, sockerr, std::ios::failure);
/**
* Convierte el pedido HTTP en texto.
*/
friend std::ostream& operator<<(std::ostream& os,
- const HTTPRequest& req);
+ const HTTPRequest& req) throw(sockerr);
};