NavigationRedirectParameters


public final class NavigationRedirectParameters


A class which exposes response headers for onNavigationRedirected.

Summary

Public methods

@NonNull 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 methods

getResponseHeaders

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

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

The Set-Cookie header is never included.

Returns
@NonNull 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")
public int getStatusCode()

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

Returns
int

The HTTP status code.