java.lang.Object
com.github.mizosoft.methanol.FormBodyPublisher
- All Implemented Interfaces:
MimeBodyPublisher
,HttpRequest.BodyPublisher
,Flow.Publisher<ByteBuffer>
A
BodyPublisher
for form submission using the application/x-www-form-urlencoded
request type.-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
A builder ofFormBodyPublisher
instances. -
Method Summary
Modifier and TypeMethodDescriptionlong
Returns the url-encoded string of this body's queries.firstQuery
(String name) Returns the first value of the query associated with the given key.Returns the last value of the query associated with the given key.Returns the body's media type.static FormBodyPublisher.Builder
Returns a newFormBodyPublisher.Builder
.queries()
Returns this body's queries.void
subscribe
(Flow.Subscriber<? super ByteBuffer> subscriber)
-
Method Details
-
encodedString
Returns the url-encoded string of this body's queries. -
firstQuery
Returns the first value of the query associated with the given key.- Parameters:
name
- the query's name
-
lastQuery
Returns the last value of the query associated with the given key.- Parameters:
name
- the query's name
-
queries
Returns this body's queries. -
mediaType
Description copied from interface:MimeBodyPublisher
Returns the body's media type.- Specified by:
mediaType
in interfaceMimeBodyPublisher
-
contentLength
public long contentLength()- Specified by:
contentLength
in interfaceHttpRequest.BodyPublisher
-
subscribe
- Specified by:
subscribe
in interfaceFlow.Publisher<ByteBuffer>
-
newBuilder
Returns a newFormBodyPublisher.Builder
.
-