Create platform client settings

You need to create the OlpClientSettings object to get catalog and partition metadata, retrieve versioned, volatile, and stream layer data, and publish data to the HERE platform.

To create OlpClientSettings object:

  1. To perform requests asynchronously, create the TaskScheduler object.

    std::shared_ptr<olp::thread::TaskScheduler> task_scheduler =
  2. To internally operate with the HERE platform Services, create the Network client.

    std::shared_ptr<olp::http::Network> http_client = olp::client::


    The Network client is designed and intended to be shared.

  3. Authenticate to the HERE platform.

  4. (Optional) For data that is stored in the cache, to add expiration limit, set the default_cache_expiration to the needed expiration time.

    By default, expiration is disabled.


    You can only disable expiration for the mutable and in-memory cache. This setting does not affect the protected cache as no entries are added to the protected cache in the read-only mode.

    std::chrono::seconds default_cache_expiration = std::chrono::seconds(200);
  1. Set up the OlpClientSettings object.

    olp::client::OlpClientSettings client_settings;
    client_settings.authentication_settings = auth_settings;
    client_settings.task_scheduler = std::move(task_scheduler);
    client_settings.network_request_handler = std::move(http_client);
    client_settings.cache =
    client_settings.default_cache_expiration = std::chrono::seconds(200);

results matching ""

    No results matching ""