Crystal-lang httpget basic_auth
<p>I am writing some code in Ruby... But I can't figure out how basic authentication works with Crystal-lang. </p>

<p>In ruby I had to always use request.basic_auth but that probably doesn't work in Crystal lang. <br>
What am I doing ruby? Could someone write that line request.basic_auth in Crystal-lang?</p>

<pre><code>    request = HTTP::Client.get "http://127.0.0.1:#{ports[coinName]}/"
    request.basic_auth username([coinName], password[coinName])
    json = JSON.parse(request.body
</code></pre>

<p>error</p>

<pre><code>in ./src/coinHashRate.cr:29: undefined method 'basic_auth' for HTTP::Client::Response

    request.basic_auth username[coinName], password[coinName]
            ^~~~~~~~~~
</code></pre>