Interface InterceptableResponseBody.ResourceData

Enclosing interface:
InterceptableResponseBody

public static interface InterceptableResponseBody.ResourceData

A resource payload producer.

Since:
1.6
Author:
Jeremy Kuhn
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    value(Resource resource)
    Sets the specified resource in the response payload.
  • Method Details

    • value

      void value(Resource resource) throws IllegalStateException

      Sets the specified resource in the response payload.

      This method tries to determine the content type of the specified resource in which case the content type header is set in the response.

      Parameters:
      resource - a resource
      Throws:
      IllegalStateException - if the request has already been sent to the endpoint and a response received