fromPut

fun fromPut(response: Response, responseBody: ByteString, responseContentType: MediaType?, requestBody: ByteString, requestContentType: MediaType?): ResponseCache?

Creates a ResponseCache from the response to a PUT request if the server sent an ETag. Caches the response body if there is one.

Return

The ResponseCache; null if the response is not eligible for caching.

Parameters

response

The response to the PUT request, whose headers and status code determine eligibility.

responseBody

The already-buffered response body bytes.

responseContentType

The media type of responseBody.

requestBody

The body of the PUT request.

requestContentType

The media type of requestBody.