# <HTTP>

Use the HTTP element to specify various parameters for use when communicating with HTTP web servers.

## Full element example

      <HTTP>
        <UserAgent>
          <Send                 value="default"/>
          <Name>iSiloXC/3.0 Windows/32</Name>
        </UserAgent>
        <Timeouts>
          <MaxRetriesPerPage    value="3"/>
          <MaxConnectTime       value="60"/>
          <MaxSendTime          value="30"/>
          <MaxReceiveTime       value="30"/>
        </Timeouts>
      </HTTP>

## Sub-element summary

Tag | Type | Default | Description
--- | --- | --- | ---
`<UserAgent>` | n/a | n/a | User agent settings container element
`<Send>` | value | default | Whether to send the User-Agent header line
`<Name>` | string | n/a | The user-agent name to send
`<Timeouts>` | n/a | n/a | Communication timeout settings container element
`<MaxRetriesPerPage>` | value | 3 | Maximum number of retries per page
`<MaxConnectTime>` | value | 60 | Maximum connect wait time
`<MaxSendTime>` | value | 30 | Maximum send wait time
`<MaxReceiveTime>` | value | 60 | Maximum receive wait time

## <UserAgent> sub-element descriptions

Web browsers and other programs that connect to a web server usually send information to the web server to identify the user agent used to access the server. Some web servers may not answer requests for content from user agents which do not identify themselves.

### <Send>

Description
Set the value attribute of the tag to one of the following values:

- `no`: Do not send the User-Agent header line.
- `default`: Use the default user agent name. This varies depending on the version of iSiloX or iSiloXC used and the operating system on which it is run.
- `custom`: Send the user agent name as specified by the Name element.

Examples
This example specifies that the User-Agent header line should not be sent.

      <Send                 value="no"/>

This example specifies that the default user agent name should be sent.

      <Send                 value="default"/>

This example specifies that the custom user agent name should be sent.

      <Send                 value="custom"/>

### <Name>

Description
The content of the Name element is the custom user agent name that is sent if the Send element's value attribute is set to `custom`.
Examples
This example set the custom user agent name to "Mozilla/4.75 [en] (Win98; U)", which is the user agent name sent by Netscape Communicator 4.75.

      <Name>Mozilla/4.75 [en] (Win98; U)</Name>

## <Timeouts> sub-element descriptions

Depending on network conditions, communication may take longer. To prevent premature timeout of connection to HTTP web servers, you can set the number of retries on a given attempt to download content and the timeout values used to determine whether a connection failed.

### <MaxRetriesPerPage>

Description
Set the value attribute of the tag to the maximum number of times to try to download a given page.
Examples
This example sets the maximum number of times to try to get each page to two tries.

      <MaxRetriesPerPage    value="2"/>

### <MaxConnectTime>

Description
Set the value attribute of the tag to the maximum number of seconds to wait when attempting to establish a connection to a web server.
Examples
This example sets the connection time out value to 30 seconds.

      <MaxConnectTime       value="30"/>

### <MaxSendTime>

Description
Set the value attribute of the tag to the maximum number of seconds to wait when attempting send retrieval request information to a web server.
Examples
This example sets the send time out value to 15 seconds.

      <MaxSendTime          value="15"/>

### <MaxReceiveTime>

Description
Set the value attribute of the tag to the maximum number of seconds to wait when waiting for more content from a web server.
Examples
This example sets the receive time out value to 120 seconds.

      <MaxReceiveTime       value="120"/>

©1999-2017 DC & Co. All rights reserved.