Class MultipartBodyPublisher.Part
java.lang.Object
com.github.mizosoft.methanol.MultipartBodyPublisher.Part
- Enclosing class:
MultipartBodyPublisher
A part in a multipart request body.
-
Method Summary
Modifier and TypeMethodDescriptionReturns theBodyPublisherof this part's content.static MultipartBodyPublisher.Partcreate(HttpHeaders headers, HttpRequest.BodyPublisher bodyPublisher) Returns a newPartwith the given headers and body publisher.headers()Returns this part's headers.
-
Method Details
-
headers
Returns this part's headers. -
bodyPublisher
Returns theBodyPublisherof this part's content. -
create
public static MultipartBodyPublisher.Part create(HttpHeaders headers, HttpRequest.BodyPublisher bodyPublisher) Returns a newPartwith the given headers and body publisher.- Throws:
IllegalArgumentException- if any of the given headers' names is invalid or if aContent-Typeheader is present but the given publisher is aMimeBodyPublisher
-