HTTP: Difference between revisions

Content added Content deleted
(Undo revision 315436 by WdeCvfYlmB (talk))
(Undo revision 315435 by WdeCvfYlmB (talk))
Line 854: Line 854:
=={{header|Factor}}==
=={{header|Factor}}==
<lang factor>USE: http.client
<lang factor>USE: http.client
"http://www.w3.org/Home.html" http-get nip print</lang>
"http://www.rosettacode.org" http-get nip print</lang>


=={{header|Forth}}==
=={{header|Forth}}==
{{works with|GNU Forth|0.7.0}}
{{works with|GNU Forth|0.7.0}}
This works at the socket level, returning both the HTTP headers and page contents.
This works at the socket level, returning both the HTTP headers and page contents.
<lang forth>
<lang forth>include unix/socket.fs
include unix/socket.fs
s"www.w3.org" 80 open-socket
dup s\" GET /Home.html HTTP/1.0\n\n" rot write-socket

s" localhost" 80 open-socket
dup s\" GET / HTTP/1.0\n\n" rot write-socket
dup pad 8092 read-socket type
dup pad 8092 read-socket type
close-socket
close-socket</lang>
</lang>


=={{header|friendly interactive shell}}==
=={{header|friendly interactive shell}}==