To put these in a useful form for the API, I'd first have to split them into their components, then pass those into the URI builder. Seems like a lot of effort to go through.
If I just ran them through like this:
net::make_uri(httpbin::host, {httpbin::resources::get()})
then it will URI escape the slash characters, which is not what we want at all.
The alternative would be to do this:
net::make_uri(httpbin::host + httpbin::resources::get())
but I'm not sure if that's any better than just using a string?
Hmm, just started looking at this, and the httpbin paths aren't really in a useful form for this.
i.e. they provide:
base = "http:// 127.0.0. 1:5000"
path = "/get/banana"
To put these in a useful form for the API, I'd first have to split them into their components, then pass those into the URI builder. Seems like a lot of effort to go through.
If I just ran them through like this: :make_uri( httpbin: :host, {httpbin: :resources: :get()} )
net:
then it will URI escape the slash characters, which is not what we want at all.
The alternative would be to do this: :make_uri( httpbin: :host + httpbin: :resources: :get())
net:
but I'm not sure if that's any better than just using a string?