A small frontend to the libcURL library.

Configuration
-------------

The component will try to fetch the given resource. If this operation stalls
for a given amount of time, the transfer will be aborted. The duration can be
set by setting the 'progress_timeout' attribute in the '<config>' node. It is
specified in milliseconds and the default value is 10 seconds.

The 'ignore_failures' attribute instructs the component to always report
success (via exit-code 0). It is useful when batching is used where a
failed fetch operation should not influence the over-all result. The default
value is 'false'.


The following config snippets illustrate its usage.

Load the socket plugin in to the fetchurl binary (print output to log):
!<config>
! <libc stdout="/dev/log" stderr="/dev/log"
!       rtc="/dev/rtc" socket="/socket"/>
! <vfs>
!  <dir name="dev">
!   <log/> <null/>
!   <inline name="rtc">2000-01-01 00:00</inline>
!   <inline name="random">01234567890123456789</inline>
!  </dir>
!  <dir name="socket"> <lwip dhcp="yes"/> </dir>
! </vfs>
! <fetch url="http://genode.org/about/LICENSE"
!        path="/dev/log" retry="3"/>
! <report progress="yes"/>
!</config>

Use the socket plugin of an other vfs (store file in a directory):
!<config>
! <libc stdout="/dev/log" stderr="/dev/log"
!       rtc="/dev/rtc" socket="/socket"/>
! <vfs>
!  <dir name="dev">
!   <log/> <null/>
!   <inline name="rtc">2000-01-01 00:00</inline>
!   <inline name="random">01234567890123456789</inline>
!  </dir>
!  <fs name="tcpip"/>
!  <dir name="download"> <fs label="download"/> </dir>
! </vfs>
! <fetch url="http://genode.org/about/LICENSE"
!        path="/download/LICENSE" retry="3"/>
! <report progress="yes"/>
!</config>

The two primary options are 'url', the URL to fetch, and 'path', the
file-system path where fetched data is written. Secondary options are
'retry' and 'proxy'. Retry is the number of fetch attempts to make
following failure, and proxy is used to reroute requests.

An example TOR proxying configuration:

! <fetch url="http://genode.org/about/LICENSE" path="LICENSE"
!        proxy="sock5://10.0.0.1:9050" />

The presence of a 'report' node in the configuration with an
affirmative 'progress' attribute will enable a progress report.
The 'delay_ms' attribute will set the minimum interval between
reports and defauts to 100 miliseconds. The report format is as
follows.

! <progress>
!   <fetch url="..." total="100.0" now="50.0"/>
! </progress>
