I\'ve a task to test different user agents on a URL through automation. I\'m using ruby to code, and I\'ve been trying to set an user agent using the following method, but i
The included Net::HTTPHeader has the initialize_http_header method:
@http = Net::HTTP.new(URL) @http.initialize_http_header({'User-Agent' => useragent}) response = @http.request_get(URL)
HTH