arthur-shaw / susoapi

R interface for Survey Solutions' APIs
https://arthur-shaw.github.io/susoapi/
Other
9 stars 5 forks source link

`get_workspaces` issues error for valid url #3

Closed arthur-shaw closed 3 years ago

arthur-shaw commented 3 years ago

From #2 :

get_workspace gives an error - Could not resolve host: server.name:9700api; Unknown error

For get_workspace function, I was able to locate the error. I entered "server.name:9700" as the server name. Adding a / at the end ("server.name:9700/") resolved the issue.

base_url <- paste0(server, "api/v1/workspaces") should have a / making it base_url <- paste0(server, "/api/v1/workspaces"). Its is not usual to add the / at the end of the server name.

The issue, as @ashwinikalantri points out, is that constructed URL is missing a / at the beginning.