java.lang.Object
java.net.http.HttpRequest
com.github.mizosoft.methanol.TaggableRequest
- Direct Known Subclasses:
MutableRequest
An
HttpRequest
that can carry arbitrary values, referred to as tags. Tags can be used to
carry application-specific data throughout interceptors
and listeners. Tags
are mapped by their type. One type cannot map to more than one tag.-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
AnHttpRequest.Builder
that allows attaching tags.Nested classes/interfaces inherited from class java.net.http.HttpRequest
HttpRequest.BodyPublisher, HttpRequest.BodyPublishers
-
Method Summary
Modifier and TypeMethodDescriptionstatic TaggableRequest
from
(HttpRequest request) Returns either the given request if it's aTaggableRequest
or a newTaggableRequest
copy with no tags otherwise.<T> Optional
<T> Returns the tag associated with the given type if present.<T> Optional
<T> Returns the tag associated with the given type if present.Methods inherited from class java.net.http.HttpRequest
bodyPublisher, equals, expectContinue, hashCode, headers, method, newBuilder, newBuilder, newBuilder, timeout, uri, version
-
Method Details
-
tag
Returns the tag associated with the given type if present. -
tag
Returns the tag associated with the given type if present. -
from
Returns either the given request if it's aTaggableRequest
or a newTaggableRequest
copy with no tags otherwise.
-