-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Rest Client Reactive - multipart support #17173
Rest Client Reactive - multipart support #17173
Conversation
cd098d8
to
b63447c
Compare
b63447c
to
fd1aa99
Compare
This workflow status is outdated as a new workflow run has been triggered. |
This workflow status is outdated as a new workflow run has been triggered. 🚫 This workflow run has been cancelled. Failing Jobs - Building b63447c
|
The failure is as follows and is not related to the change
|
I'm aware that this should get some documentation. But if this PR is otherwise okay, I'd rather add the documentation in a separate PR as I need to do some other stuff in the following days... |
I'll have a look on Monday. We will absolutely need documentation for this before the final release |
@@ -871,6 +910,212 @@ A more full example of generated client (with sub-resource) can is at the bottom | |||
|
|||
} | |||
|
|||
private ResultHandle createMultipartForm(MethodCreator methodCreator, ResultHandle methodParam, Type formClassType, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we get some comments on this? It's pretty large and I have no idea what it's supposed to do :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added some
comments :)
...untime/src/main/java/org/jboss/resteasy/reactive/client/api/QuarkusRestClientProperties.java
Show resolved
Hide resolved
...time/src/main/java/org/jboss/resteasy/reactive/client/handlers/ClientSendRequestHandler.java
Show resolved
Hide resolved
integration-tests/resteasy-reactive-rest-client-multipart/pom.xml
Outdated
Show resolved
Hide resolved
|
||
@FormParam("file") | ||
@PartType(MediaType.APPLICATION_OCTET_STREAM) | ||
public byte[] file; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'll have to be very careful on how we document this and other blocking variants
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I updated the PR and, among others, added some basic documentation. Could you elaborate on ^? What do you think is worth mentioning?
With the current implementation, is there any way a user could send a multipart stream without reading all bytes in memory? |
One could use files, see https://github.com/quarkusio/quarkus/pull/17173/files#diff-00c5b96175fbd95dec22f03f0df7e05d4369109d19a6547cf60bffffdc7625bbR82 |
...rest-client-multipart/src/main/java/io/quarkus/it/rest/client/multipart/MultipartClient.java
Outdated
Show resolved
Hide resolved
Nice! |
at the moment only File is supported. This creates a Then the code here does the actual sending |
Let's support
So IIUC, this code is lifted from the vertx-web client? If so, great! |
fd1aa99
to
de3d256
Compare
de3d256
to
0b4e96a
Compare
This workflow status is outdated as a new workflow run has been triggered. |
Yes, the code is heavily based on (and in some places simply copied from) vertx-web, as such, should be non-blocking. I added support for |
No description provided.