Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generic HttpEntity support in HttpClientRequest #996

Closed
ppslim opened this issue May 18, 2019 · 2 comments
Closed

Generic HttpEntity support in HttpClientRequest #996

ppslim opened this issue May 18, 2019 · 2 comments

Comments

@ppslim
Copy link

ppslim commented May 18, 2019

The HttpClientRequest Rest engine already leverages org.apache.http.HttpEntity in HttpClientRequest#execute for the items supported via StringEntity, but misses an extremely cheap chance for wider support via is HttpEntity-> r.entity = entity

Due to the lack of open classes, it is current required to clone HttpClientEngine, HttpClientRequest & HttpClientResponse (plus ext functions on Rest.post) in order to support generic HttpEntity support.

In my use case, I have a single call requirement (application login) that involves multipart. Rest provides all the support I need except this.

With the engine/request/response cloned, I am now able to leverage the Apache clients MultipartEntityBuilder

@edvin
Copy link
Owner

edvin commented May 19, 2019

I've added support for passing HttpEntity along like you suggested :)

@ctadlock
Copy link
Collaborator

Closing as resolved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants