LLRC RequestOptions add RequestConfig (#57972)

Different kinds of requests may need different request options from the client 
default. Users can optionally set RequestConfig on a single request's 
RequestOptions to override the default. Without this, socketTimeout can only 
set at RestClient initialization.
This commit is contained in:
weizijun 2020-06-29 23:19:04 +08:00 committed by GitHub
parent 4542dfc107
commit 974f6e66b6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 75 additions and 3 deletions

View file

@ -25,6 +25,13 @@ seconds).
include-tagged::{doc-tests}/RestClientDocumentation.java[rest-client-config-timeouts]
--------------------------------------------------
timeouts also can set by RequestOptions per request.this will override RestClient customizeRequestConfig.
["source","java",subs="attributes,callouts,macros"]
--------------------------------------------------
include-tagged::{doc-tests}/RestClientDocumentation.java[rest-client-config-request-options-timeouts]
--------------------------------------------------
=== Number of threads
The Apache Http Async Client starts by default one dispatcher thread, and a