HTTP: Difference between revisions
Undo revision 315481 by WdeCvfYlmB (talk)
Thundergnat (talk | contribs) (Undo revision 315492 by WdeCvfYlmB (talk)) |
Thundergnat (talk | contribs) (Undo revision 315481 by WdeCvfYlmB (talk)) |
||
Line 1,713:
=={{header|Ruby}}==
The simple way loads the entire content into memory, then prints it.
<lang ruby>require 'open-uri'▼
<lang ruby>▼
|f| f.read
▲require 'open-uri'
▲print open("http://rosettacode.org") {|f| f.read}
If the content might be large, the better way uses FileUtils.copy_stream.
<lang ruby>require 'fileutils'▼
▲require 'fileutils'
require 'open-uri'
open("http://www.w3.org/Home.html") {
}</lang>
=={{header|Run BASIC}}==
Line 1,924 ⟶ 1,919:
Const HTTPREQUEST_PROXYSETTING_PROXY As Long = 2
#Const USE_PROXY = 1
#If USE_PROXY Then
#End If
End Sub</lang>
|