post_request {gym} | R Documentation |
Submit a POST request to an OpenAI Gym server.
Description
Submit a POST request to an OpenAI Gym server.
Usage
post_request(x, route, data = NULL)
Arguments
x |
An instance of class "GymClient"; this object has "remote_base" as an attribute. |
route |
The URL path or endpoint. |
data |
URL query arguments. Default value is NULL. |
Value
If the response code is 200 or 204, a parsed response. Else, a server error or raised exception.
Examples
## Not run:
remote_base <- "http://127.0.0.1:5000"
client <- create_GymClient(remote_base)
route <- "/v1/envs/"
env_id <- "CartPole-v0"
data <- list(env_id = env_id)
post_request(client, route, data)
## End(Not run)
[Package gym version 0.1.0 Index]