- You are working with the LaunchDarkly federal instance. If you are using the federal instance of LaunchDarkly, you must configure the SDK so that it connects to the federal instance for these services instead.
- You are working with the LaunchDarkly European Union (EU) instance. If you are using the EU instance of LaunchDarkly, you must configure the SDK so that it connects to the federal instance for these services instead. To learn which URLs to use instead, read the EU instance documentation.
- You are using the Relay Proxy in proxy mode. To learn more, read Using proxy mode.
- You are using the LaunchDarkly CLI to run a local
dev-serverfor testing, and you want to access local flag values from there. To learn more, read Using the LaunchDarkly CLI for local testing.
Client-side SDKs
This feature is available in the following client-side SDKs:- .NET (client-side)
- Android
- C++ (client-side)
- Electron
- Flutter
- iOS
- JavaScript
- Node.js (client-side)
- React Native
- React Web
- Roku
- Vue
.NET (client-side)
Expand .NET (client-side) code sample
Expand .NET (client-side) code sample
ServiceEndpoints builder method to specify the base URIs. Here are some examples for common base URIs that you might use instead of the defaults:Android
Expand Android code sample
Expand Android code sample
streamUri, pollUri, and eventsUri builder methods to specify the base URIs. Here are some examples for common base URIs that you might use instead of the defaults:C++ (client-side)
Expand C++ (client-side) code sample
Expand C++ (client-side) code sample
StreamingBaseUrl, PollingBaseUrl, and EventsBaseUrl to specify the base URIs. Here are some examples for common base URIs that you might use instead of the defaults:ServiceEndpoints.Electron
Expand Electron code sample
Expand Electron code sample
streamUrl, baseUrl, and eventsUrl options to specify the base URIs. Here are some examples for common base URIs that you might use instead of the defaults:baseUrl for the initial connection and subsequent identify calls.If you have enabled streaming, the SDK uses the streamUrl for subsequent connections. If you have enabled useReport, these subsequent requests will use the REPORT HTTP request method. These REPORT requests are streaming requests only if you have installed the LaunchDarkly EventSource polyfill to provide streaming support. Otherwise, these requests will be standard REPORT http requests. To learn more, read EventSource under Requirements and polyfills.Flutter
Expand Flutter code sample
Expand Flutter code sample
ServiceEndpoints configuration option to specify the base URIs. Here are some examples for common base URIs that you might use instead of the defaults:serviceEndpoints.iOS
Expand iOS code sample
Expand iOS code sample
streamUrl, baseUrl, and eventsUrl properties to specify the base URIs. Here are some examples for common base URIs that you might use instead of the defaults:JavaScript
Expand JavaScript code sample
Expand JavaScript code sample
streamUri, baseUri, and eventsUri properties to specify the base URIs. In previous versions of the JavaScript SDK, these properties were named streamUrl, baseUrl, and eventsUrl, respectively.Here are some examples for common base URIs that you might use instead of the defaults:baseUri for the initial connection and subsequent identify calls.If you have enabled streaming, the SDK uses the streamUri for subsequent connections. If you have enabled useReport, these subsequent requests will use the REPORT HTTP request method. These REPORT requests are streaming requests only if you have installed the LaunchDarkly EventSource polyfill to provide streaming support. Otherwise, these requests will be standard REPORT http requests. To learn more, read EventSource under Requirements and polyfills.Node.js (client-side)
Expand Node.js (client-side) code sample
Expand Node.js (client-side) code sample
streamUrl, baseUrl, and eventsUrl properties to set the base URIs. Here are some examples for common base URIs that you might use instead of the defaults:baseUrl for the initial connection and subsequent identify calls.If you have enabled streaming, the SDK uses the streamUrl for subsequent connections. If you have enabled useReport, these subsequent requests will use the REPORT HTTP request method. These REPORT requests are streaming requests only if you have installed the LaunchDarkly EventSource polyfill to provide streaming support. Otherwise, these requests will be standard REPORT http requests. To learn more, read EventSource under Requirements and polyfills.React Native
Expand React Native code sample
Expand React Native code sample
streamUri, baseUri, and eventsUri properties to set the base URIs. Here are some examples for common base URIs that you might use instead of the defaults:streamUri, pollUri, and eventsUri. They were renamed to streamUrl, pollUrl, and eventsUrl in version 7.0. In version 10.0, they are named streamUri, baseUri, and eventsUri. To learn more, read LDOptions.React Web
Expand React Web code sample
Expand React Web code sample
streamUrl, baseUrl, and eventsUrl options to specify the base URIs. Here are some examples for common base URIs that you might use instead of the defaults:baseUrl for the initial connection and subsequent identify calls.If you have enabled streaming, the SDK uses the streamUrl for subsequent connections. If you have enabled useReport, these subsequent requests will use the REPORT HTTP request method. These REPORT requests are streaming requests only if you have installed the LaunchDarkly EventSource polyfill to provide streaming support. Otherwise, these requests will be standard REPORT http requests. To learn more, read EventSource under Requirements and polyfills.To learn more, read Configuration options in the React Web SDK reference.Roku
Expand Roku code sample
Expand Roku code sample
setStreamURI, setAppURI, and setEventsURI methods to specify the base URIs:Vue
Expand Vue code sample
Expand Vue code sample
streamUrl, baseUrl, and eventsUrl options to specify the base URIs. Here are some examples for common base URIs that you might use instead of the defaults:Server-side SDKs
This feature is available for the following server-side SDKs:- .NET (server-side)
- Apex
- C++ (server-side)
- Erlang
- Go
- Haskell
- Java
- Lua
- Node.js (server-side)
- PHP
- Python
- Ruby
- Rust
.NET (server-side)
Expand .NET (server-side) code sample
Expand .NET (server-side) code sample
ServiceEndpoints builder method to specify the base URIs. Here are some examples for common base URIs that you might use instead of the defaults:Apex
Expand Apex code sample
Expand Apex code sample
C++ (server-side)
Expand C++ (server-side) code sample
Expand C++ (server-side) code sample
StreamingBaseUrl, PollingBaseUrl, and EventsBaseUrl to specify the base URIs. Here are some examples for common base URIs that you might use instead of the defaults:ServiceEndpoints() in ConfigBuilder.Erlang
Expand Erlang code sample
Expand Erlang code sample
stream_uri, base_uri, and events_uri properties to set the base URIs. Here are some examples for common base URIs that you might use instead of the defaults:Go
Expand Go code sample
Expand Go code sample
Config.ServiceEndpoints property and interfaces.ServiceEndpoints() to specify the base URIs. Here are some examples for common base URIs that you might use instead of the defaults:Haskell
Expand Haskell code sample
Expand Haskell code sample
configSetStreamURI, configSetBaseURI, and configSetEventsURI to specify the base URIs. Here are some examples for common base URIs that you might use instead of the defaults:Java
Expand Java code sample
Expand Java code sample
serviceEndpoints builder method to specify the base URIs. Here are some examples for common base URIs that you might use instead of the defaults:Lua
Expand Lua code sample
Expand Lua code sample
serviceEndpoints property to specify the base URLs. Here are some examples for common base URLs that you might use instead of the defaults:clientInit.Node.js (server-side)
Expand Node.js (server-side) code sample
Expand Node.js (server-side) code sample
streamUri, baseUri, and eventsUri properties to specify the base URIs.Here are some examples for common base URIs that you might use instead of the defaults:PHP
Expand PHP code sample
Expand PHP code sample
base_uri and events_uri properties to specify the base URIs. Here are some examples for common base URIs that you might use instead of the defaults:Python
Expand Python code sample
Expand Python code sample
stream_uri, base_uri, and events_uri properties to specify the base URIs. Here are some examples for common base URIs that you might use instead of the defaults:Ruby
Expand Ruby code sample
Expand Ruby code sample
stream_uri, base_uri, and events_uri properties to specify the base URIs. Here are some examples for common base URIs that you might use instead of the defaults:Rust
Expand Rust code sample
Expand Rust code sample
ConfigBuilder and ServiceEndpointsBuilder to specify the base URIs. Here are some examples for common base URIs that you might use instead of the defaults: