I'm trying to send parameters with an URL, like http://localhost:3000/register?name=Chris&job=typist
. I can send that all at once as a string with httpc:request
, but I can't find a function to put the query parameters in the URL(given a dictionary).
Is there another HTTP library I should be using that has this capability?
I'd like to give it a root URL with a hash/dictonary/map (in json {"a" : "b", "c" : "d"}) that then appends it correctly to the end of the url. For example, given "www.facebook.com"
and [{"a", "b"}, {"c", "d"}]
would give "www.facebook.com?a=b&c=d"
.
Here is a similar question for Ruby: Ruby: How to turn a hash into HTTP parameters?