A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://en.wikibooks.org/wiki/Ruby_Programming/Standard_Library/Net::HTTP below:

Ruby Programming/Standard Library/Net::HTTP - Wikibooks, open books for an open world

How to access webpages with Net::HTTP[edit | edit source]

Allows access to downloading webpages.

a 1.8 example:

require 'net/http'
mainp = Net::HTTP.new('www.hello.com', 80)
response, content = mainp.get('index.html', nil)
puts content

Here is the rdoc which contains many examples.

See also OpenURI.

how to do it with https (ssl) snippets.dzone.com/posts/show/788


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4