Redirecting from https
to http
is bad, and HTTPClient protects you against that.
If you really want to allow for that, and eliminate the exception, you can override redirect_uri_callback
:
client.redirect_uri_callback = ->(uri, res) {
res.header['location'][0]
}