30#include "iceberg/catalog/rest/iceberg_rest_export.h"
32namespace iceberg::rest {
35enum class HttpMethod : uint8_t { kGet, kPost, kPut, kDelete, kHead };
38constexpr std::string_view ToString(HttpMethod method) {
40 case HttpMethod::kGet:
42 case HttpMethod::kPost:
44 case HttpMethod::kPut:
46 case HttpMethod::kDelete:
48 case HttpMethod::kHead:
59 using is_transparent = void;
61 bool operator()(std::string_view lhs, std::string_view rhs)
const noexcept {
62 const auto min_size = lhs.size() < rhs.size() ? lhs.size() : rhs.size();
63 for (std::size_t i = 0; i < min_size; ++i) {
64 auto left =
static_cast<unsigned char>(lhs[i]);
65 auto right =
static_cast<unsigned char>(rhs[i]);
66 const int lower_left = std::tolower(left);
67 const int lower_right = std::tolower(right);
68 if (lower_left < lower_right)
return true;
69 if (lower_left > lower_right)
return false;
71 return lhs.size() < rhs.size();
82using HttpHeaders = std::map<std::string, std::string, CaseInsensitiveHeaderLess>;
87 HttpMethod method = HttpMethod::kGet;
An outgoing HTTP request. Mirrors Java's HttpRequest so signing implementations like SigV4 see method...
Definition http_request.h:86