mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-30 16:05:51 +00:00
HTTP support improvements:
* RFC2616 compliance * Case insensitive equality, inequality operators for strings * Improvements to http::parser * Tidy up HTTP method enumeration
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
#define BEAST_HTTP_METHOD_H_INCLUDED
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
namespace beast {
|
||||
namespace http {
|
||||
@@ -65,6 +66,20 @@ enum class method_t
|
||||
http_purge
|
||||
};
|
||||
|
||||
std::string
|
||||
to_string (method_t m);
|
||||
|
||||
template <class Stream>
|
||||
Stream&
|
||||
operator<< (Stream& s, method_t m)
|
||||
{
|
||||
return s << to_string(m);
|
||||
}
|
||||
|
||||
/** Returns the string corresponding to the numeric HTTP status code. */
|
||||
std::string
|
||||
status_text (int status);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user