A processor app that proxies requests to the URL specified.
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)
$ ./mvnw clean install -PgenerateApps
$ cd appsYou can find the corresponding binder based projects here. You can then cd into one of the folders and build it:
$ ./mvnw clean packagejava -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=8081stream 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"