Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
SDK
/
exoplayer
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
bdd1968a
authored
Jun 12, 2015
by
Oliver Woodman
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Allow reading of response headers from HttpDataSource implementations
parent
36617264
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
0 deletions
library/src/main/java/com/google/android/exoplayer/upstream/DefaultHttpDataSource.java
library/src/main/java/com/google/android/exoplayer/upstream/HttpDataSource.java
library/src/main/java/com/google/android/exoplayer/upstream/DefaultHttpDataSource.java
View file @
bdd1968a
...
@@ -153,6 +153,11 @@ public class DefaultHttpDataSource implements HttpDataSource {
...
@@ -153,6 +153,11 @@ public class DefaultHttpDataSource implements HttpDataSource {
}
}
@Override
@Override
public
Map
<
String
,
List
<
String
>>
getResponseHeaders
()
{
return
connection
==
null
?
null
:
connection
.
getHeaderFields
();
}
@Override
public
void
setRequestProperty
(
String
name
,
String
value
)
{
public
void
setRequestProperty
(
String
name
,
String
value
)
{
Assertions
.
checkNotNull
(
name
);
Assertions
.
checkNotNull
(
name
);
Assertions
.
checkNotNull
(
value
);
Assertions
.
checkNotNull
(
value
);
...
...
library/src/main/java/com/google/android/exoplayer/upstream/HttpDataSource.java
View file @
bdd1968a
...
@@ -145,4 +145,11 @@ public interface HttpDataSource extends UriDataSource {
...
@@ -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
();
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment