File tree Expand file tree Collapse file tree 2 files changed +2
-8
lines changed
Expand file tree Collapse file tree 2 files changed +2
-8
lines changed Original file line number Diff line number Diff line change 2626
2727namespace iceberg ::rest {
2828
29- // ... 构造函数实现...
30-
3129template <typename R, typename E, std::uint16_t SuccessCode>
3230Result<R> HttpClient::Get (const std::string& target, const cpr::Parameters& params) {
3331 session_.SetUrl (cpr::Url{session_.GetFullRequestUrl () + target});
Original file line number Diff line number Diff line change @@ -97,10 +97,6 @@ nlohmann::json ToJson(const ListNamespaceResponse& response) {
9797 nlohmann::json json;
9898 json[kNamespaces ] = response.namespaces ;
9999
100- if (response.next_page_token .has_value ()) {
101- json[kNextPageToken ] = response.next_page_token .value ();
102- }
103-
104100 return json;
105101}
106102
@@ -110,7 +106,7 @@ Result<ListNamespaceResponse> ListNamespaceResponseFromJson(const nlohmann::json
110106
111107 if (!json.contains (kNamespaces )) {
112108 return std::unexpected (
113- Status:: InvalidArgument (" ListNamespaceResponse missing 'namespaces' field" ));
109+ InvalidArgument (" ListNamespaceResponse missing 'namespaces' field" ));
114110 }
115111 response.namespaces = json[kNamespaces ].get <std::vector<std::vector<std::string>>>();
116112
@@ -120,7 +116,7 @@ Result<ListNamespaceResponse> ListNamespaceResponseFromJson(const nlohmann::json
120116
121117 return response;
122118 } catch (const std::exception& e) {
123- return std::unexpected (Status:: InvalidArgument (
119+ return std::unexpected (InvalidArgument (
124120 std::format (" Failed to parse ListNamespaceResponse: {}" , e.what ())));
125121 }
126122}
You can’t perform that action at this time.
0 commit comments