Class FormBodyPublisher
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
Nested ClassesModifier and TypeClassDescriptionstatic final classA builder ofFormBodyPublisherinstances. -
Method Summary
Modifier and TypeMethodDescriptionlongReturns 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.BuilderReturns a newFormBodyPublisher.Builder.queries()Returns this body's queries.voidsubscribe(Flow.Subscriber<? super ByteBuffer> subscriber)
-
Method Details
-
encodedString
Returns the url-encoded string of this body's queries. -
firstQuery
-
lastQuery
-
queries
-
mediaType
Description copied from interface:MimeBodyPublisherReturns the body's media type.- Specified by:
mediaTypein interfaceMimeBodyPublisher
-
contentLength
public long contentLength()- Specified by:
contentLengthin interfaceHttpRequest.BodyPublisher
-
subscribe
- Specified by:
subscribein interfaceFlow.Publisher<ByteBuffer>
-
newBuilder
Returns a newFormBodyPublisher.Builder.
-