-
Notifications
You must be signed in to change notification settings - Fork 367
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
Update HttpSender.Request.Builder
to support multipart/form-data request bodies with multiple parts
#5044
base: main
Are you sure you want to change the base?
Update HttpSender.Request.Builder
to support multipart/form-data request bodies with multiple parts
#5044
Conversation
…est bodies with multiple parts
HttpSender.Request.Builder
to support multipart/form-data request bodies with multiple parts
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.
Some suggestions could not be made:
- rewrite-hcl/src/main/java/org/openrewrite/hcl/format/TabsAndIndentsVisitor.java
- lines 255-256
- rewrite-hcl/src/main/java/org/openrewrite/hcl/internal/HclPrinter.java
- lines 363-364
- rewrite-java/src/main/java/org/openrewrite/java/internal/template/AnnotationTemplateGenerator.java
- lines 158-159
- rewrite-java/src/main/java/org/openrewrite/java/internal/template/BlockStatementTemplateGenerator.java
- lines 281-282
- lines 669-669
- rewrite-java/src/main/java/org/openrewrite/java/search/FindEmptyClasses.java
- lines 57-57
- rewrite-xml/src/main/java/org/openrewrite/xml/internal/XmlPrinter.java
- lines 106-106
- rewrite-yaml/src/main/java/org/openrewrite/yaml/cleanup/RemoveUnusedVisitor.java
- lines 76-76
@@ -129,11 +127,13 @@ public String toString() { | |||
|
|||
@SuppressWarnings("UnusedReturnValue") | |||
public static class Builder { | |||
private static final String APPLICATION_JSON = "application/json"; | |||
private static final String TEXT_PLAIN = "text/plain"; | |||
public static final String APPLICATION_JSON = "application/json"; |
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.
This is exposed for tests I think? Can you make these package private instead?
/** | ||
* Adds a part to a multipart/form-data request body. | ||
* | ||
* @param type The "Content-Type" of the part. |
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.
maybe rename it to contentType
?
What's changed?
Update
HttpSender.Request.Builder
to support building multipart/form-data request bodies with multiple parts.What's your motivation?
This functionality is required for CLI feature development.
Anything in particular you'd like reviewers to focus on?
No.
Anyone you would like to review specifically?
@pstreef
Have you considered any alternatives or workarounds?
No.
Any additional context
No.
Checklist