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();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, List<String>> getResponseHeaders() {
|
||||
return connection == null ? null : connection.getHeaderFields();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setRequestProperty(String name, String value) {
|
||||
Assertions.checkNotNull(name);
|
||||
|
@ -145,4 +145,11 @@ public interface HttpDataSource extends UriDataSource {
|
||||
*/
|
||||
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