GET requests with the HTTP client
HTTP client

Next:POST requests with the HTTP client


Basic usage involves passing a url and getting a response and data back:
http-get ( url -- response data )

http-get* ( url -- response data )


To download to a file, see the HTTP Download Utilities vocabulary.

Advanced usage involves constructing a request, which allows HTTP cookies and HTTP headers to be set:
<get-request> ( url -- request )

http-request ( request -- response data )

http-request* ( request -- response data )


The http-request and http-request* words output sequences. This is undesirable if the response data may be large. Another pair of words take a quotation instead, and pass the quotation chunks of data incrementally:
with-http-request ( request quot: ( chunk -- ) -- response/stream )