HttpDataSource.Factory


public interface HttpDataSource.Factory extends DataSource.Factory


A factory for HttpDataSource instances.

Summary

Public methods

abstract HttpDataSource

Creates a DataSource instance.

abstract HttpDataSource.Factory
@UnstableApi
setDefaultRequestProperties(
    Map<StringString> defaultRequestProperties
)

Sets the default request headers for HttpDataSource instances created by the factory.

Public methods

createDataSource

@UnstableApi
abstract HttpDataSource createDataSource()

Creates a DataSource instance.

setDefaultRequestProperties

@UnstableApi
abstract HttpDataSource.Factory setDefaultRequestProperties(
    Map<StringString> defaultRequestProperties
)

Sets the default request headers for HttpDataSource instances created by the factory.

The new request properties will be used for future requests made by HttpDataSources created by the factory, including instances that have already been created. Modifying the defaultRequestProperties map after a call to this method will have no effect, and so it's necessary to call this method again each time the request properties need to be updated.

Parameters
Map<StringString> defaultRequestProperties

The default request properties.

Returns
HttpDataSource.Factory

This factory.