configurable request
Opened this issue · 0 comments
mndrix commented
I'm not sure if this is a good idea. The first argument of web:get/2
accepts a URL. In some sense, that argument represents the HTTP request. The second argument represents the HTTP response. What if we also accepted a list of options for the first argument:
url
- specifies the request URLauth(basic(User,Password))
- enables HTTP Basic authenticationheader(Name,Value)
- adds an HTTP request headertimeout
- maximum time to wait for a response
Most of these are sugar for http_open/3 options so implementation should be fairly easy.