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