How would I make the following curl request in ruby?
curl -k -X GET -H "Content-Type: application/xml" -H "Accept: application/xml" -H "X-OFFERSDB-API-KEY: demo" 'http://testapi.offersdb.com/distribution/beta/offers?radius=10&postal_code=30305' I'm having difficulty with some of the headers.
require 'net/http' url = 'http://testapi.offersdb.com/distribution/beta/offers?radius=10&postal_code=30305' mykey = 'demo' request = Net::HTTP.new(url) request.request_head('/', 'X-OFFERSDB-API-KEY' => mykey) puts request