Skip to content

Commit 6bab3a5

Browse files
committed
Fix query parameters for fetching env dynamics
1 parent a259727 commit 6bab3a5

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/bitrl/network/rest_rl_env_client.cpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,9 @@ RESTRLEnvClient::reset(const std::string& env_name, const std::string& idx,
151151
nlohmann::json request_body;
152152
request_body["seed"] = seed;
153153
request_body["options"] = options;
154-
154+
155+
156+
std::cout<<"Sending body request: "<<request_body.dump()<<std::endl;
155157
const auto response = request.send("POST", request_body.dump());
156158

157159
if(response.status.code != 202){
@@ -183,6 +185,8 @@ RESTRLEnvClient::make(const std::string& env_name,
183185
nlohmann::json request_body;
184186
request_body["version"] = version;
185187
request_body["options"] = options;
188+
189+
std::cout<<"Sending body request: "<<request_body.dump()<<std::endl;
186190

187191
const auto response = request.send("POST", request_body.dump());
188192

@@ -207,8 +211,8 @@ RESTRLEnvClient::dynamics(const std::string& env_name, const std::string& idx,
207211
throw std::logic_error("Environment: " + env_name + " is not registered");
208212
}
209213

210-
const auto request_url = url_ + "/" + idx + "/dynamics?stateId="+std::to_string(sidx)
211-
+"&actionId="+std::to_string(aidx);
214+
const auto request_url = url_ + "/" + idx + "/dynamics?state_id="+std::to_string(sidx)
215+
+"&action_id="+std::to_string(aidx);
212216
http::Request request{request_url};
213217
const auto response = request.send("GET");
214218

0 commit comments

Comments
 (0)