Class RVHeadersDataSourceCredentials

  • All Implemented Interfaces:
    IRVDataSourceCredential

    public class RVHeadersDataSourceCredentials
    extends Object
    implements 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 Detail

      • RVHeadersDataSourceCredentials

        public RVHeadersDataSourceCredentials()
        Creates an empty headers credentials object, you can use addHeader(String, String) to add headers.
      • RVHeadersDataSourceCredentials

        public RVHeadersDataSourceCredentials​(Map<String,​String> headers)
        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

        public RVHeadersDataSourceCredentials​(String singleHeaderName,
                                              String singleHeaderValue)
        Helper constructor to create a headers credentials with a single header, you can add additional headers with addHeader(String, String).
        Parameters:
        singleHeaderName - Header name, it will be ignored if null.
        singleHeaderValue - Header value, it will be ignored if null.
    • Method Detail

      • addHeader

        public void addHeader​(String headerName,
                              String headerValue)
        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.