How should i add header to HTTP GET request using ruby
<p>Trying to add header in the request</p>

<pre><code>email = "blahblah@gmail.com"
token = "abcdefghijk"
url = "http://www.somewebsite.com/request?params1=value1&amp;params2=value2"

uri = URI.parse(url)
http = Net::HTTP.new(uri.host, uri.port).start
request = Net::HTTP::Get.new(uri.request_uri)
request['email'] = email
request['token'] = token

response = http.request(request)

render json: response.body
</code></pre>

<p>The results i have gotten back is <code>{"error":"invalid request parameters"}</code></p>

<p>I am supposed to get back a list of data in json. I tried using postman to test if the url is working and passed the email and token inside header and i got back the data that i wanted. 
I am not sure where it went wrong with the code. Can anybody advise me which part did i do wrongly? Thanks a lot!</p>