NavigationRedirectParameters


class NavigationRedirectParameters


A class which exposes response headers for onNavigationRedirected.

Summary

Public functions

(Mutable)Map<String!, String!>
@RequiresFeature(name = WebViewFeature.NAVIGATION_GET_RESPONSE_HEADERS, enforcement = "androidx.webkit.WebViewFeature#isFeatureSupported")
getResponseHeaders()

Returns the HTTP response headers of this redirect response (for example Location).

Int
@RequiresFeature(name = WebViewFeature.NAVIGATION_GET_RESPONSE_HEADERS, enforcement = "androidx.webkit.WebViewFeature#isFeatureSupported")
getStatusCode()

Returns the status code received by the navigation for the current redirect callback.

Public functions

getResponseHeaders

@RequiresFeature(name = WebViewFeature.NAVIGATION_GET_RESPONSE_HEADERS, enforcement = "androidx.webkit.WebViewFeature#isFeatureSupported")
fun getResponseHeaders(): (Mutable)Map<String!, String!>

Returns the HTTP response headers of this redirect response (for example Location).

The Set-Cookie header is never included.

Returns
(Mutable)Map<String!, String!>

An unmodifiable Map from header name to header value.

getStatusCode

@RequiresFeature(name = WebViewFeature.NAVIGATION_GET_RESPONSE_HEADERS, enforcement = "androidx.webkit.WebViewFeature#isFeatureSupported")
fun getStatusCode(): Int

Returns the status code received by the navigation for the current redirect callback.

Returns
Int

The HTTP status code.