mirror of
https://github.com/androidx/media.git
synced 2025-05-03 21:57:46 +08:00
Allow reading of response headers from HttpDataSource implementations
This commit is contained in:
parent
3661726401
commit
bdd1968abe
@ -152,6 +152,11 @@ public class DefaultHttpDataSource implements HttpDataSource {
|
|||||||
return connection == null ? null : connection.getURL().toString();
|
return connection == null ? null : connection.getURL().toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Map<String, List<String>> getResponseHeaders() {
|
||||||
|
return connection == null ? null : connection.getHeaderFields();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setRequestProperty(String name, String value) {
|
public void setRequestProperty(String name, String value) {
|
||||||
Assertions.checkNotNull(name);
|
Assertions.checkNotNull(name);
|
||||||
|
@ -145,4 +145,11 @@ public interface HttpDataSource extends UriDataSource {
|
|||||||
*/
|
*/
|
||||||
void clearAllRequestProperties();
|
void clearAllRequestProperties();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the headers provided in the response.
|
||||||
|
*
|
||||||
|
* @return The response headers, or {@code null} if response headers are unavailable.
|
||||||
|
*/
|
||||||
|
Map<String, List<String>> getResponseHeaders();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user