intercept

abstract suspend fun intercept(httpResponseData: HttpResponseData): NetworkResponse<ResponseType>?

Intercepts the provided HTTP response to determine if it can be mapped to a specific NetworkResponse.

Return

a specific NetworkResponse instance if the response can be mapped, or null if it cannot.

Parameters

ResponseType

the type of the successful response body expected.

httpResponseData

the HTTP response to be intercepted, containing headers, status code, and body.