ok2c commented on code in PR #844:
URL:
https://github.com/apache/httpcomponents-client/pull/844#discussion_r3524854070
##########
httpclient5-jakarta-rest-client/src/main/java/org/apache/hc/client5/http/rest/RestInvocationHandler.java:
##########
@@ -184,7 +188,9 @@ private Object executeRequest(final ResourceMethod rm,
final boolean isAsync = isAsync(rm.getMethod());
final Class<?> rawType = resolveResponseType(rm.getMethod(), isAsync);
- final Future<?> future = dispatchAsync(rawType, requestProducer);
+ final Future<?> future = isNameValuePairCollection(rm.getMethod(),
isAsync)
+ ? dispatchFormResponse(requestProducer)
+ : dispatchAsync(rawType, requestProducer);
Review Comment:
@arturobernalg This looks ugly. Are you certain we need a separate method
for form data and this logic cannot be added to `dispatchAsync`?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]