olp-cpp-sdk
1.21.0
|
Settings to provide URLs for API lookup requests. More...
#include <OlpClientSettings.h>
Public Types | |
using | LookupEndpointProvider = std::function< std::string(const std::string &)> |
An alias for the lookup provider function. More... | |
using | CatalogEndpointProvider = std::function< std::string(const HRN &)> |
An alias for the catalog endpoint provider function. More... | |
Public Attributes | |
LookupEndpointProvider | lookup_endpoint_provider |
The provider of endpoint for API lookup requests. More... | |
CatalogEndpointProvider | catalog_endpoint_provider = nullptr |
The endpoint provider for API requests. More... | |
Settings to provide URLs for API lookup requests.
using olp::client::ApiLookupSettings::CatalogEndpointProvider = std::function<std::string(const HRN&)> |
An alias for the catalog endpoint provider function.
Catalogs that have a static URL or can be accessed through a proxy service can input the URL provider here. This URL provider is taken by the ApiLookupClient
and returned directly to the caller without any requests to the API Lookup Service.
TaskScheduler
as it might result in a dead-lock.using olp::client::ApiLookupSettings::LookupEndpointProvider = std::function<std::string(const std::string&)> |
An alias for the lookup provider function.
Users of this provider should always return full lookup API path, e.g. for "here" partition return "https://api-lookup.data.api.platform.here.com/lookup/v1"
CatalogEndpointProvider olp::client::ApiLookupSettings::catalog_endpoint_provider = nullptr |
The endpoint provider for API requests.
If some of the catalogs have fixed URLs and do not need the API Lookup Service, you can provide the static URL via CatalogEndpointProvider
. Every request will receive this URL from ApiLookupClient
without any HTTP requests to the API Lookup Service. CatalogEndpointProvider
is called before lookup_endpoint_provider
, and if the output is not empty, lookup_endpoint_provider
is not called additionally.
LookupEndpointProvider olp::client::ApiLookupSettings::lookup_endpoint_provider |
The provider of endpoint for API lookup requests.
The lookup API endpoint provider will be called prior to every API lookup attempt to get the API Lookup URL which shall be asked for the catalog URLs.
By default DefaultLookupEndpointProvider
is being used.