Join us on the livestream at Android Dev Summit on 7-8 November 2018, starting at 10AM PDT!

UrlResponseInfo.HeaderBlock

public static abstract class UrlResponseInfo.HeaderBlock extends Object

Unmodifiable container of response headers or trailers.

Public Constructor Summary

Public Method Summary

abstract List<Entry<StringString>>
getAsList()
Returns an unmodifiable list of the response header field and value pairs.
abstract Map<StringList<String>>
getAsMap()
Returns an unmodifiable map from response-header field names to lists of values.

Inherited Method Summary

Public Constructors

public UrlResponseInfo.HeaderBlock ()

Public Methods

public abstract List<Entry<StringString>> getAsList ()

Returns an unmodifiable list of the response header field and value pairs. The headers are in the same order they are received over the wire.

Returns
  • an unmodifiable list of response header field and value pairs

public abstract Map<StringList<String>> getAsMap ()

Returns an unmodifiable map from response-header field names to lists of values. Each list of values for a single header field is in the same order they were received over the wire.

Returns
  • an unmodifiable map from response-header field names to lists of values