Skip to content

Latest commit

 

History

History
75 lines (53 loc) · 3.02 KB

File metadata and controls

75 lines (53 loc) · 3.02 KB

HttpclientGateway Processor

A processor app that proxies requests to the URL specified.

Input

Headers

Payload

Output

Headers

Payload

Options

The httpclient-gateway processor has the following options:

httpclient-gateway.content-length-to-externalize

Threshold values that determines when content downloaded from remote servers should be stored at resourceLocationUri. (Long, default: 1024)

httpclient-gateway.follow-redirect

Follow Redirects (Boolean, default: true)

httpclient-gateway.mapped-request-headers

Http Request Headers that will be mapped. (String[], default: <none>)

httpclient-gateway.mapped-response-headers

Http Response Headers that will be mapped. (String[], default: <none>)

httpclient-gateway.request-per-second

Delay before HTTP requests are actually sent. Works as preemptive rate limit. (Integer, default: 1)

httpclient-gateway.resource-location-uri

Base URI where externalized contents will be stored. (String, default: file:///tmp/)

httpclient-gateway.retry-error-status-codes

HTTP Status Codes to retry (Integer[], default: [429])

httpclient-gateway.retry-url-regex

Regex to match against the URL strings for which the requests attempts have been failed and retry should be performed (String[], default: <none>)

httpclient-gateway.url

The URL to issue an http request to, as a static value. (String, default: <none>)

httpclient-gateway.url-expression

A SpEL expression against incoming message to determine the URL to use. (Expression, default: <none>)

httpclient-gateway.url-patterns-to-externalize

URL patterns to determine whether content downloaded from remote servers should be stored at resourceLocationUri (String[], default: <none>)

httpclient-gateway.wire-tap

Enable wireTap (Boolean, default: false)

Build

$ ./mvnw clean install -PgenerateApps
$ cd apps

You can find the corresponding binder based projects here. You can then cd into one of the folders and build it:

$ ./mvnw clean package

Examples

java -jar httpclient-gateway-processor-kafka-2.1.0.RELEASE.jar \
     --spring.cloud.stream.bindings.input.destination=httpinput \
     --spring.cloud.stream.bindings.output.destination=input \
     --spring.cloud.stream.bindings.input.group=http-gateway \
     --logging.level.reactor.netty.http.client.HttpClient=DEBUG \
     --httpclient-gateway.wireTap=true \
     --httpclient-gateway.url=https://ads.line.me
     --server.port=8081

stream create --name httpclient-gateway --definition ":output > httpclient-gateway --logging.level.reactor.netty.http.client.HttpClient=DEBUG --httpclient-gateway.wireTap=true --httpclient-gateway.url=https://httpbin.org/ > :input"