Created
January 21, 2022 18:59
-
-
Save rmirabelli/6e1445125dca8a5bb511ddbcf4eef50d to your computer and use it in GitHub Desktop.
Implementation of AzureAppConfiguration using the AzureAppConfiguration-Swift package.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let endpoint = "https://OBTAINED-FROM-DASHBOARD.azconfig.io" | |
let secret = "PASTE-SECRET-HERE" | |
let credential = "PASTE-CREDENTIAL-HERE" | |
// Fetch and decode the configuration | |
let request = try AzureAppConfiguration.prepareRequest(endpoint: endpoint, secret: secret, credential: credential) | |
let (data, _) = try await URLSession.shared.data(for: request) | |
let dictionary = try AzureAppConfiguration.decodeResponse(data: data) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment