forked from mongodb/docs-realm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(DOCSP-32926 & DOCSP- 32216): Custom HTTP Headers for Kotlin (mongodb…
…#3009) ## Pull Request Info - Add info for custom HTTP headers - Update existing [Connect to App Services](https://www.mongodb.com/docs/realm/sdk/kotlin/app-services/connect-to-app-services-backend/) page ### Jira - https://jira.mongodb.org/browse/DOCSP-32926 - https://jira.mongodb.org/browse/DOCSP-32216 ### Staged Changes - [Connect to Atlas App Services - Kotlin SDK](https://docs-mongodbcom-staging.corp.mongodb.com/realm/docsworker-xlarge/docsp-32926-http-headers/sdk/kotlin/app-services/connect-to-app-services-backend/) ### Reminder Checklist If your PR modifies the docs, you might need to also update some corresponding pages. Check if completed or N/A. - [x] Create Jira ticket for corresponding docs-app-services update(s), if any - [x] Checked/updated Admin API - [x] Checked/updated CLI reference ### Review Guidelines [REVIEWING.md](https://github.com/mongodb/docs-realm/blob/master/REVIEWING.md)
- Loading branch information
1 parent
9ed8670
commit f970475
Showing
7 changed files
with
170 additions
and
30 deletions.
There are no files selected for viewing
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
1 change: 1 addition & 0 deletions
1
source/examples/generated/kotlin/AppClientTest.snippet.close-app-client.kt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
app.close() |
9 changes: 5 additions & 4 deletions
9
source/examples/generated/kotlin/AppClientTest.snippet.configure-app-client.kt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
App.create( | ||
AppConfiguration.Builder(YOUR_APP_ID) | ||
.log(LogLevel.ALL) | ||
.build()) | ||
// Creates an App with custom configuration values | ||
AppConfiguration.Builder(YOUR_APP_ID) // Replace with your App ID | ||
.appName("my-app-name") | ||
.encryptionKey(myEncryptionKey) | ||
.build() |
3 changes: 2 additions & 1 deletion
3
source/examples/generated/kotlin/AppClientTest.snippet.initialize-app-client.kt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
val app = App.create(YOUR_APP_ID) | ||
// Creates an App with default configuration values | ||
val app = App.create(YOUR_APP_ID) // Replace with your App ID |
6 changes: 6 additions & 0 deletions
6
source/examples/generated/kotlin/AppClientTest.snippet.set-custom-http-headers.kt
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
AppConfiguration.Builder(YOUR_APP_ID) | ||
.authorizationHeaderName("MyApp-Authorization") | ||
.customRequestHeaders { | ||
put("X-MyApp-Version", "1.0.0") | ||
} | ||
.build() |
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
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