Package org.apache.tapestry5.http.services

## Interface HttpRequestBodyConverter

- All Known Implementing Classes:
    `JacksonHttpRequestBodyConverter`, `TypeCoercerHttpRequestBodyConverter`

      @UsesOrderedConfiguration(HttpRequestBodyConverter.class)
      public interface HttpRequestBodyConverter

  Service that converts the body of an HTTP request to a given target class. Each implementation, which should be contributed to the `HttpRequestBodyConverter` service, should check whether it can actually handled that request. If not, it should return `null`, which means trying the next HttpRequestBodyConverter instance.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `<T> T` | `convert​(HttpServletRequest request, Class<T> type)` | Converts the body of this request.

- - ### Method Detail

    - #### convert

          <T> T convert​(HttpServletRequest request,
                        Class<T> type)

      Converts the body of this request. If this implementation cannot handle this request, probably by not handling its content type, it should return `null`. In addition, if the request body is empty, this method should also return `null`.
      Parameters:
        `request` - an HttpServletRequest.
        `type` - the target type.
      Returns:
        an object of the target type or `null`.