HTTP: Difference between revisions

Undo revision 315436 by WdeCvfYlmB (talk)
(Undo revision 315437 by WdeCvfYlmB (talk))
(Undo revision 315436 by WdeCvfYlmB (talk))
Line 859:
{{works with|GNU Forth|0.7.0}}
This works at the socket level, returning both the HTTP headers and page contents.
<lang forth>include unix/socket.fs
s"www.w3.org"include 80 open-unix/socket.fs
 
dup s\" GET /Home.html HTTP/1.0\n\n" rot write-socket
s" localhost" 80 open-socket
dup s\" GET /Home.html HTTP/1.0\n\n" rot write-socket
dup pad 8092 read-socket type
close-socket</lang>
</lang>
 
=={{header|friendly interactive shell}}==
{{trans|UNIX Shell}}
<lang fishshell>curl -s-silent -L-location http://rosettacodewww.w3.org/Home.html</lang>
<lang fishshell>wgetlynx -O - -qsource http://rosettacodewww.w3.org/Home.html</lang>
 
<lang fishshell>lynxwget -source-output-document=- --quiet http://rosettacodewww.w3.org/Home.html</lang>
<lang fishshell>lftp -c "cat http://rosettacodewww.w3.org/Home.html"</lang>
 
<lang fishshell>wget -O - -q http://rosettacode.org/</lang>
 
<lang fishshell>lftp -c "cat http://rosettacode.org/"</lang>
 
{{works with|BSD}}
<lang fishshell>ftp -o - http://rosettacode.org ^ /dev/null</lang>
10,333

edits