Interface HttpBodyAccessor.HttpBodyProvider<EXC extends Exception>

Type Parameters:
EXC - The exception type which may be thrown upon converting to the desired type.
All Known Subinterfaces:
HttpClientRequest, HttpClientRequest.HttpClientRequestBuilder, HttpServerResponse
All Known Implementing Classes:
HttpClientRequestImpl, HttpServerResponseImpl
Enclosing interface:
HttpBodyAccessor

public static interface HttpBodyAccessor.HttpBodyProvider<EXC extends Exception>
A provider interface provides a "toSomething(?)" method which converts a given instance into something else. The ContentTypeAccessor.ContentTypeProvider converts an implementing instance's state into a ContentType instance.
  • Method Summary

    Modifier and Type Method Description
    String toHttpBody()
    Converts an object representing the HTTP body to a String instance.
  • Method Details

    • toHttpBody

      String toHttpBody() throws EXC extends Exception
      Converts an object representing the HTTP body to a String instance. Automatically determines the ContentType from any headers when applicable.
      Returns:
      The converted String instance represented by the according object.
      Throws:
      EXC - Thrown in case providing the type as String failed.