17 string repr = http_method_str(
method_);
26 struct http_parser_url urldata;
28 int res = http_parser_parse_url(
url_.c_str(),
url_.size(),
false, &urldata);
29 if (res == 0 &&
BitIsSet(urldata.field_set, UF_PATH)) {
30 path =
url_.substr(urldata.field_data[UF_PATH].off,
31 urldata.field_data[UF_PATH].len);
37 struct http_parser_url urldata;
39 int res = http_parser_parse_url(
url_.c_str(),
url_.size(),
false, &urldata);
40 if (res == 0 &&
BitIsSet(urldata.field_set, UF_QUERY)) {
41 query =
url_.substr(urldata.field_data[UF_QUERY].off,
42 urldata.field_data[UF_QUERY].len);
std::string ToString() const
std::string UrlQuery() const
std::string UrlPath() const
bool BitIsSet(IntType value, size_t bit)