Was this helpful?

TargetEndpoint Transport Properties

The HTTPTargetConnection element in TargetEndpoint configurations defines a set of HTTP transport properties. You can use these properties to set transport-level configurations.

Properties are set on TargetEndpoint HTTPTargetConnection elements as shown below:

<TargetEndpoint name="default">
  <HTTPTargetConnection>
    <URL>http://weather.yahooapis.com</URL>
    <Properties>
      <Property name="supports.http10">true</Property>
      <Property name="request.retain.headers">User-Agent,Referer,Accept-Language</Property>
      <Property name="retain.queryparams">apikey</Property>
    </Properties>
  </HTTPTargetConnection>
</TargetEndpoint>

TargetEndpoint Transport Property Specification

Property Name Default Value Description
keepalive.timeout.millis 60000 Timeout for the target connection in the connection pool. if the connection is in the pool beyond the specified limit, then the connection is closed.
connect.timeout.millis 60000 Target connection timeout.
io.timeout.millis 12000

If there is no data to read for the specified number of milliseconds, or if the socket is not ready to write data for specified number of milliseconds, then the transaction is treated as a timeout.

  • If a timeout happens while reading HTTP request, 408, Request Timeout is returned.
  • If a timeout happens while reading HTTP response, 504, Gateway Timeout is returned.
supports.http10 true If this is true and the client sends a 1.0 request, the target is also sent a 1.0 request. Otherwise 1.1 request is sent to target.
supports.http11 true If this is true and the client sends a 1.1 request, the target is also sent a 1.1 request, otherwise 1.0 request is sent to target.
use.proxy true If set to true, and proxy configurations are specified in http.properties (on-premises deployments only), then target connections are set to use the specified proxy.
use.proxy.tunneling true If this is set to true, and proxy configurations are specified in http.properties (on-premises deployments only), then target connections are set to use the specified via tunnel. If the target uses SSL, then this property is ignored, and the message is always sent via a tunnel.
enable.method.override false For the specified HTTP method, sets an X-HTTP-Method-Override header on the outbound request to the target service. For example, <Property name="GET.override.method">POST</Property>
*.override.method N/A For the specified HTTP method, sets an X-HTTP-Method-Override header on the outbound request. For example, <Property name="GET.override.method">POST</Property>
response.streaming.enabled false When true, HTTP response payloads are not read into buffer. The response payload streams as-is to the client. The response payload will not be available for policy enforcement.
success.codes N/A By default, Apigee Edge treats HTTP code 4XX or 5XX as errors, and it treats HTTP code 1XX, 2XX, 3XX as success. This property enables explicit definition of success codes, for example, 2XX, 1XX, 505 treats any 100, 200 and 505 HTTP response codes as success.
compression.algorithm N/A By default, Apigee Edge forwards requests to the target using the same compression type as the client request. If the request is received from client using, for example, gzip compression, then Apigee Edge forwards the request to target using gzip compression. If the response received from target uses deflate, then Apigee Edge forwards the response to the response to the client using deflate. Supported values are:
  • gzip: always send message using gzip compression
  • deflate: always send message using deflate compression
  • none: always send message without any compression
request.retain.headers.enabled true By default, Apigee Edge always retains all HTTP headers on outbound messages. When set to true, all HTTP headers present on the inbound request are set on the outbound request.
request.retain.headers N/A Defines specific HTTP headers from the request that should be set on the outbound request to the target service. For example, to 'passthrough' the User-Agent header, set the value of request.retain.headers to User-Agent. Multiple HTTP headers are specified as a comma-separated list, for example, User-Agent,Referer,Accept-Language. This property overrides request.retain.headers.enabled. If request.retain.headers.enabled is set to false, any headers specified in the request.retain.headers property are still set on the outbound message.
response.retain.headers.enabled true By default, Apigee Edge always retains all HTTP headers on outbound messages. When set to true, all HTTP headers present on the inbound response from the target service are set on the outbound response before it is passed to the ProxyEndpoint.
response.retain.headers N/A Defines specific HTTP headers from the response that should be set on the outbound response before it is passed to the ProxyEndpoint. For example, to 'passthrough' the Expires header, set the value of response.retain.headers to Expires. Multiple HTTP headers are specified as a comma-separated list, for example, Expires,Set-Cookie. This property overrides response.retain.headers.enabled. If response.retain.headers.enabled is set to false, any headers specified in the response.retain.headers property are still set on the outbound message.
retain.queryparams.enabled true By default, Apigee Edge always retains all query parameters on outbound requests. When set to true, all query parameters present on the inbound request are set on the outbound request to the target service.
retain.queryparams N/A Defines specific query parameters to set on the outbound request. For example, to include the query parameter apikey from the request message, set retain.queryparams to apikey. Multiple query parameters are specified as a comma-separated list, for example, apikey,environment. This property overrides retain.queryparams.enabled.

ProxyEndpoint Transport Properties

ProxyEndpoint HTTPTargetConnection elements define a set of HTTP transport properties. These properties can be used to set transport-level configurations.

Properties are set on ProxyEndpoint HTTPProxyConnection elements as follows:

<ProxyEndpoint name="default">
  <HTTPProxyConnection>
    <URL>http://weather.yahooapis.com</URL>
    <Properties>
      <Property name="allow.http10">true</Property>
      <Property name="request.streaming.enabled">true</Property>
    </Properties>
  </HTTPProxyConnection>
</ProxyEndpoint>

ProxyEndpoint Transport Property Specification

Property Name Default Value Description
allow.http10 true If this is true and the client app sends a 1.0 request, the target is also sent a 1.0 request. If false, then an HTTP 1.1 request is sent to target.
allow.http11 true If this is true and the client app sends a 1.1 request, the target is also sent a 1.1 request. If false, then an HTTP 1.0 request is sent to target.
allow.http.method.* OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, PATCH BY default, all HTTP methods are allowed. Use this setting to disable any HTTP method by setting the value for the property name, for example, name="allow.http.method.POST" to false. For example,
<Property name="allow.http.method.PUT">false</Property>

If the incoming request's method is not allowed, then the HTTP status code 405, "Method Not Allowed" will be returned, along with an Allow header whose value is the list of all methods that are allowed.

X-Forwarded-For false When set to true, the virtual host's PI address is added to the outbound request as the value of the HTTP X-Forwarded-For header.
allow.POST.without.content.length false When set to false, if the request method is POST and is not chunked, not compressed and the content-length header is missing, then the HTTP response code 411 "Length Required" is returned. When set to true, for the same scenario, the content-length is assumed to be zero, and the request is processed without parsing the payload.
allow.PUT.without.content.length false When set to false case : If the request method is PUT and is not chunked, not compressed and the content-length header is missing, then the HTTP response code 411 "Length Required" is returned. When set to true, for the same scenario, the content-length is assumed to be zero, and the request is processed without parsing the payload.
request.streaming.enabled false By default, HTTP streaming is disabled; the HTTP request payload is written to a buffer in memory before processing by the API proxy request pipeline. When set to true, the request payload is streamed without modification to the target, bypassing the API proxy request pipeline.
response.streaming.enabled false By default, HTTP streaming is disabled; the HTTP response payload is written to a buffer in memory before processing by the API proxy response pipeline. When set to true, the response payload is streamed without modification to the client app, bypassing the API proxy response pipeline.
compression.algorithm N/A By default, Apigee Edge honors the compression type set for any message received. For example, where a client submits a request that uses gzip compression, Apigee Edge forwards the request to target using gzip compression. You can configure compression algorithms to be explicitly applied by setting this property on the TargetEndpoint or ProxyEndpoint. Supported values are gzip, deflate, and none. Use none to disable the default algorithm matching behavior of Apigee Edge.

 

Add new comment

Provide your email address if you wish to be contacted offline about your comment.
We will not display your email address as part of your comment.

We'd love your feedback and perspective! Please be as specific as possible.
Type the characters you see in this picture. (verify using audio)

Type the characters you see in the picture above; if you can't read them, submit the form and a new image will be generated. Not case sensitive.