[REQ] add getWebClient to ApiClient
Created by: PeterBuschSF
Describe the solution you'd like
My company uses spring-cloud-sleuth for transaction tracing. This tool requires that the WebClient be registered as a Bean.
I would prefer to allow the ApiClient to build the WebClient using it's defaults. Then retrieve the completed WebClient from the ApiClient so I can register as a Bean.
ApiClient apiClient = new ApiCient();
WebClient webClient = apiClient.getWebClient();
Describe alternatives you've considered
I currently achieve this by:
- Create an ObjectMapper using the steps copied from from the ApiClient's default constructor.
- Call ApiClient.buildWebClient with the ObjectMapper to build the WebClient
- Call the ApiClient(WebClient, ObjectMapper, DateFormat) constructor to build the ApiClient object.
I realize if I needed to customize the ObjectMapper, DateFormat, and/or WebClient, I might use this option anyway. But I don't have a need for that.