urlFetchF :: F HttpReq HttpResp type HttpReq = HttpRequest URL type HttpResp = Either String (URL, Either String HttpResponse)
urlFetchF
is a fudget that fetches documents from given URLs.
It supports the HTTP, FTP, Gopher and NNTP (for news) protocols. It also
handles local files and directories.
urlFetchF
to start fetching a document.
Left message
where message
is a string.
When a complete document has been received, urlFetchF
outputs
Right (url,Right result)
, where url
is the URL of the
requested document and result
is the response containing
the document.
If a requested document could not be fected, urlFetchF
outputs
Right (url,Left error)
, where error
is an error message.
A simpler fudget for fetching HTML: htmlFetchF.
The types HttpRequest, HttpResponse and URL.