Show TOC Start of Content Area

Background documentation HTTP Client Properties  Locate the document in its SAP Library structure

Parameters of the HTTP client

Name

Type

Default Value

Description

allow-circular-redirects

Boolean

false

Defines whether circular redirects (redirects to the same location) should be allowed. The HTTP specification is not clear if circular redirects are permitted, therefore optionally they can be enabled.

auth-scheme-priority

java.util.ArrayList

 

The key used to look up the list of IDs of supported authentication schemes in their order of preference. The scheme IDs are stored in a java.util.Collection as java.lang.String.

If several schemes are returned in the WWW-Authenticate or Proxy-Authenticate header, this parameter defines which authentication schemes take precedence over others.

The first item in the collection represents the most preferred authentication scheme, the last item represents the ID of the least preferred one.

connection-manager-class

Class

com.sap.httpclient.SimpleHttpConnectionManager.class

The default HTTP connection manager class.

connection-manager-timeout

Long

0

The timeout in milliseconds used when retrieving an HTTP connection from the HTTP connection manager. 0 (zero) means to wait forever.

connection-timeout

Integer

0

The timeout in milliseconds until a TCP socket is opened and connection is established. A value of 0 (zero) means the timeout is not used.

content-charset

String

“ISO-8859-1”

The charter set to be used for encoding content body.

cookie-policy

String

com.sap.httpclient.cookie.CookiePolicy.RFC_2109

The cookie policy to be used for cookie management.

credential-charset

String

 

The charter set to be used when encoding credentials. If it is not defined, then the value of the http.protocol.element-charset should be used.

date-patterns

Collection

'EEE, dd MMM yyyy HH:mm:ss zzz',

'EEEE, dd-MMM-yy HH:mm:ss zzz',

'EEE MMM d HH:mm:ss yyyy',

'EEE, dd-MMM-yyyy HH:mm:ss z',

'EEE, dd-MMM-yyyy HH-mm-ss z',

'EEE, dd MMM yy HH:mm:ss z',

'EEE dd-MMM-yyyy HH:mm:ss z',

'EEE dd MMM yyyy HH:mm:ss z',

'EEE dd-MMM-yyyy HH-mm-ss z',

'EEE dd-MMM-yy HH:mm:ss z',

'EEE dd MMM yy HH:mm:ss z',

'EEE,dd-MMM-yy HH:mm:ss z',

'EEE,dd-MMM-yyyy HH:mm:ss z',

'EEE, dd-MM-yyyy HH:mm:ss z'

Date patterns used for parsing. The patterns are stored in a Collection and must be compatible with SimpleDateFormat.

default-headers

Collection

 

The request headers to be sent by default with each request. This parameter expects a value of type Collection. The collection is expected to contain HTTP headers.

element-charset

String

“US-ASCII”

The charter set to be used for encoding or decoding of HTTP protocol elements (status line and headers).

force-content-encoding

String

 

Defines whether to encode the data with the specified encoding. Possible values are "gzip" or "deflate".

head-body-check-timeout

Integer

 

Sets a period of time in milliseconds to wait for a content body sent in response to HEAD response from a non-compliant server. If the parameter is not set or is set to -1, then the non-compliant response body check is disabled.

max-host-connection

java.util.Map

2

Defines the maximum number of connections allowed for each host configuration. These values only apply to the number of connections from a particular instance of HttpConnectionManager.

This parameter expects a value of type Map. The value should map instances of HostConfiguration to Integers. The default value can be specified using ANY_HOST_CONFIGURATION constant of the HostConfiguration class.

max-redirects

Integer

100

Defines the maximum number of redirects to be followed. The limit on number of redirects is intended to prevent infinite loops.

max-total-connection

Integer

20

Defines the maximum possible number of connections allowed for the connection manager. This value only applies to the number of connections from a particular instance of HttpConnectionManager.

multipart-boundary

String

 

The multipart boundary string to use in conjunction with the MultipartRequestEntity. When it is not set, a random value will be generated for each request.

output-stream-interceptor

String

 

Use this parameter to set the output stream interceptor implementation(OSII).

The OSII is used to write the request body directly to the request output stream.

preemptive-authentication

Boolean

false

Defines whether authentication should be attempted preemptively.

reject-head-body

Boolean

false

Defines whether the content body sent in response to HEAD request should be rejected.

reject-relative-redirect

Boolean

false

Defines whether relative redirects should be rejected.

response-buffer-warnlimit

Integer

1024*1024

The maximum buffered response size (in bytes) that does not trigger a warning. Buffered responses exceeding this size will trigger a warning in the log. If it is not set, the limit is 1 MB.

retry-handler

com.sap.httpclient.HttpMethodRetryHandler

com.sap.httpclient.DefaultHttpMethodRetryHandler

The retry handler method is used for retrying failed methods.

single-cookie-header

Boolean

false

Defines if cookies should be put on a single response header.

socket-linger

Integer

 

The linger time (SO_LINGER) in seconds. This option disables/enables immediate return from a close() of a TCP Socket. Enabling this option with a non-zero Integer timeout means that a close() will block pending the transmission and acknowledgement of all data written to the peer, at which point the socket is closed gracefully. Value 0 (zero) implies that the option is disabled. Value -1 implies that the JRE default is used.

socket-receivebuffer

Integer

 

The value to set on Socket.setReceiveBufferSize(int size). This value is a suggestion to the kernel from the application about the size of buffers to use for the data to be received over the socket.

socket-sendbuffer

Integer

 

The value to set on Socket.setSendBufferSize(intsize). This value is a suggestion to the kernel from the application about the size of buffers to use for the data to be sent over the socket.

socket-timeout

Integer

3000

The default socket timeout (SO_TIMEOUT) in milliseconds, which is the timeout for waiting for data. A timeout value of 0 (zero) is interpreted as an infinite timeout. This value is used when no socket timeout is set in the HTTP method parameters.

stale-connection-check

Boolean

false

Determines whether stale connection check has to be used. Disabling stale connection check may result in slight performance improvement at the risk of getting an I/O error when executing a request over a connection that has been closed at the server side.

status-line-garbage-limit

Integer

Integer.MAX_VALUE

Defines the maximum number of lines that can be ignored before we expect an HTTP response's status code.

With HTTP/1.1 persistent connections, the problem arises that broken scripts could return a wrong Content-Length (there are more bytes sent than specified). Unfortunately, in some cases, this is not possible after a bad response, but only before the next one. So, the HTTP Client must be able to skip those surplus lines.

Set the value to 0 (zero) to disallow any garbage or empty lines before the status line. To specify no limit, use Integer.MAX_VALUE.

strict-transfer-encoding

Boolean

false

Defines whether responses with an invalid Transfer-Encoding header should be rejected.

tcp-nodelay

Boolean

false

Determines whether Nagle's algorithm is to be used. The Nagle's algorithm tries to conserve bandwidth by minimizing the number of segments that are sent. When applications want to decrease network latency and increase performance, they can disable Nagle's algorithm (by enabling TCP_NODELAY). Data will be sent earlier, at the cost of an increase in bandwidth consumption and number of packets.

unambiguous-statusline

Boolean

false

Defines whether HTTP methods should reject ambiguous HTTP status line.

use-depth-header

Boolean

false

Defines whether to include the Depth header even if it is not necessary, because of a specified default behavior.

use-expect-continue

Boolean

false

Activates 'Expect: 100-Continue' handshake for the entity enclosing methods. The 'Expect: 100-Continue' handshake allows a client that is sending a request message with a request body to determine if the origin server is willing to accept the request (based on the request headers) before the client sends the request body.

The use of the 'Expect: 100-continue' handshake can result in noticeable performance improvement for entity enclosing requests (such as POST and PUT) that require the target server's authentication.

'Expect: 100-continue' handshake should be used with caution, as it may cause problems with HTTP servers and proxies that do not support HTTP/1.1 protocol.

use-overwrite-header

Boolean

false

Defines whether COPY and MOVE requests should always use the overwrite header.

user-agent

String

"SAP HttpClient v1.0"

The content of the User-Agent header used by the HTTP methods.

virtual-host

String

 

Defines the virtual host name. For example: www.example.com.

warn-extra-incoming

Boolean

false

Defines HttpClient's behavior when a response provides more bytes than expected (for example, specified with the Content-Length header).

Such surplus data makes the HTTP connection unreliable for keep-alive requests, as malicious response data (such as faked headers and so on) can lead to undesired results on the next request using that connection.

If this parameter is set to true, any detection of extra input data will generate a warning in the log.

 

 

 

End of Content Area