HttpDataSource.RequestProperties


@UnstableApi
class HttpDataSource.RequestProperties


Stores HTTP request properties (aka HTTP headers) and provides methods to modify the headers in a thread safe way to avoid the potential of creating snapshots of an inconsistent or unintended state.

Summary

Public constructors

Public functions

synchronized Unit

Clears all request properties.

synchronized Unit
clearAndSet(properties: (Mutable)Map<String!, String!>!)

Removes all properties previously existing and sets the keys and values of the map.

synchronized (Mutable)Map<String!, String!>!

Gets a snapshot of the request properties.

synchronized Unit
remove(name: String!)

Removes a request property by name.

synchronized Unit
set(properties: (Mutable)Map<String!, String!>!)

Sets the keys and values contained in the map.

synchronized Unit
set(name: String!, value: String!)

Sets the specified property value for the specified name.

Public constructors

RequestProperties

RequestProperties()

Public functions

clear

synchronized fun clear(): Unit

Clears all request properties.

clearAndSet

synchronized fun clearAndSet(properties: (Mutable)Map<String!, String!>!): Unit

Removes all properties previously existing and sets the keys and values of the map.

Parameters
properties: (Mutable)Map<String!, String!>!

The request properties.

getSnapshot

synchronized fun getSnapshot(): (Mutable)Map<String!, String!>!

Gets a snapshot of the request properties.

Returns
(Mutable)Map<String!, String!>!

A snapshot of the request properties.

remove

synchronized fun remove(name: String!): Unit

Removes a request property by name.

Parameters
name: String!

The name of the request property to remove.

set

synchronized fun set(properties: (Mutable)Map<String!, String!>!): Unit

Sets the keys and values contained in the map. If a property previously existed, the old value is replaced by the specified value. If a property previously existed and is not in the map, the property is left unchanged.

Parameters
properties: (Mutable)Map<String!, String!>!

The request properties.

set

synchronized fun set(name: String!, value: String!): Unit

Sets the specified property value for the specified name. If a property for this name previously existed, the old value is replaced by the specified value.

Parameters
name: String!

The name of the request property.

value: String!

The value of the request property.