I have the rest client gem and I am defining a request like this:
url = \'http://someurl\' request = {\"data\" => data}.to_json response = RestClient.post(ur
The third parameter is the headers hash.
You can do what you want by:
response = RestClient.post( url, request, :content_type => :json, :accept => :json, :'x-auth-key' => "mykey")