Lutz Horn wrote:
> Ace Mutha schrieb:
>> I know how to do it in post but I don't know using GET.
>
> How do you do it in a POST request? The HTTP headers should not be
> diferent between GET and POST.
>
> Lutz
http = Net::HTTP.new('example.com', 80)
# POST request
data = 'searchaction=show&search=1'
headers = {
'User-Agent' => 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.3)
Gecko/20090824 Firefox/3.5.3',
'Cookie' => cookie,
'Referer' => 'Referer:
http://plain-text.info/search/',
'Content-Type' => 'application/x-www-form-urlencoded'
}
resp, data = http.post(path, data, headers)
--
Posted via
http://www.ruby-forum.com/.