The Pliant HTTP client is implemented as a file system.
It will be recorded in the file systems list through including module /pliant/protocol/http/client.pli
Then accessing the servers is just like accessing a file on you disk: you simply provide the page URL instead of the file path and name.


A sample to access an HTTP server:

module "/pliant/language/stream.pli"
module "/pliant/protocol/http/client.pli"
(gvar Stream s) open "http://www.linux.org/" in
while not s:atend
  console s:readline eol

Another sample:

module "/pliant/admin/file.pli"
module "/pliant/protocol/http/client.pli"
file_copy "http://localhost/index.html" "file:/tmp/index.html"

Warning: Please notice that you could not do:

module "/pliant/admin/file.pli"
module "/pliant/protocol/http/client.pli"
file_copy "http://www.linux.org/" "file:/tmp/linux.html"

because 'file_copy' would guess that you want to copy a full directory because the URL ends with a '/', and this is not possible because HTTP protocol does not provide provision for scanning a directory content.