Package io.revealbi.core.data
Class RVHeadersDataSourceCredentials
java.lang.Object
io.revealbi.core.data.RVHeadersDataSourceCredentials
- All Implemented Interfaces:
IRVDataSourceCredential
The class used to represent authentication using headers (including cookies), supported only by Web Resource and REST API data sources.
When sending HTTP requests to get data for the data source, the specified headers will be included.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an empty headers credentials object, you can useaddHeader(String, String)to add headers.RVHeadersDataSourceCredentials(String singleHeaderName, String singleHeaderValue) Helper constructor to create a headers credentials with a single header, you can add additional headers withaddHeader(String, String).RVHeadersDataSourceCredentials(Map<String, String> headers) Constructor used to indicate the headers that should be included in data requests. -
Method Summary
-
Constructor Details
-
RVHeadersDataSourceCredentials
public RVHeadersDataSourceCredentials()Creates an empty headers credentials object, you can useaddHeader(String, String)to add headers. -
RVHeadersDataSourceCredentials
Constructor used to indicate the headers that should be included in data requests.- Parameters:
headers- A map with the headers to send, supports only single-valued headers.
-
RVHeadersDataSourceCredentials
Helper constructor to create a headers credentials with a single header, you can add additional headers withaddHeader(String, String).- Parameters:
singleHeaderName- Header name, it will be ignored if nullsingleHeaderValue- Header value, it will be ignored if null
-
-
Method Details
-
addHeader
Adds a new header to this credentials object.- Parameters:
headerName- Header name, it will be ignored if null.headerValue- Header value, it will be ignored if null.
-
getHeaders
Returns the HTTP headers that will be included in data requests.- Returns:
- A map of header names to header values.
-