Class BodyAdapter.Hints.Builder
java.lang.Object
com.github.mizosoft.methanol.BodyAdapter.Hints.Builder
- Enclosing interface:
BodyAdapter.Hints
A builder of
Hint objects.-
Method Summary
Modifier and TypeMethodDescriptionbuild()Returns a newHintsobject containing the hints added so far.forDecoder(HttpResponse.ResponseInfo responseInfo) Adds the givenResponseInfoas a hint and a media type hint extracted from the response headers if present.forEncoder(HttpRequest request) Adds the given request as a hint and a media type hint extracted from either the request's body orContent-Typeheader, whichever is present first.Maps the given type to the given hint.Removes the hint mapped to by the given type.Removes all hints added so far.
-
Method Details
-
forEncoder
Adds the given request as a hint and a media type hint extracted from either the request's body orContent-Typeheader, whichever is present first. -
forDecoder
@CanIgnoreReturnValue public BodyAdapter.Hints.Builder forDecoder(HttpResponse.ResponseInfo responseInfo) Adds the givenResponseInfoas a hint and a media type hint extracted from the response headers if present. -
put
Maps the given type to the given hint. -
remove
Removes the hint mapped to by the given type. -
removeAll
Removes all hints added so far. -
build
Returns a newHintsobject containing the hints added so far.
-