@@ -533,7 +533,50 @@ TODO
533
533
534
534
# # Kotlin (okhttp3)
535
535
536
- TODO
536
+ Here are the detailed instructions for running the generated API Dash code in Kotlin (using okhttp3) for macOS, Windows, and Linux:
537
+
538
+ # ## 1. Install Kotlin
539
+
540
+ To run Kotlin code, you need to install Kotlin by following the below instructions:
541
+
542
+ - Go to [Kotlin Installation Guide](https://kotlinlang.org/docs/getting-started.html#install-kotlin) for detailed steps.
543
+ - Kotlin is also included in IntelliJ IDEA and Android Studio. You can also download and install one of these IDEs to start using Kotlin.
544
+
545
+ # ## 2. Add `okhttp` library
546
+
547
+ To use ` okhttp3` in your Kotlin project, you need to include it as a dependency. If you' re using **Gradle**, follow these steps:
548
+
549
+ - Open the `build.gradle` file in your project.
550
+ - Add the following dependency in the `dependencies` section:
551
+
552
+ ```gradle
553
+ implementation("com.squareup.okhttp3:okhttp:4.12.0")
554
+ ```
555
+
556
+ - Sync your project to apply the dependency.
557
+
558
+ ### 3. Execute the generated code
559
+
560
+ After setting up Kotlin and `okhttp3`, follow these steps to run the generated code:
561
+
562
+ #### Using IDE
563
+
564
+ 1. Open the installed IDE like Android Studio.
565
+ 2. Create a new Kotlin file.
566
+ 3. Copy the generated code from API Dash and paste it in the Kotlin file.
567
+ 4. Run the Kotlin file by clicking the `Run` button in the IDE or by using the command line.
568
+
569
+ #### Using command line
570
+
571
+ 1. Create a new Kotlin file.
572
+ 2. Copy the generated code from API Dash and paste it in the Kotlin file (`api_test.kt`).
573
+ 3. Navigate to the project directory using the terminal or command prompt.
574
+ 4. Compile and run the Kotlin file by executing:
575
+
576
+ ```bash
577
+ kotlinc api_test.kt -include-runtime -d api_test.jar
578
+ java -jar api_test.jar
579
+ ```
537
580
538
581
## PHP (curl)
539
582
0 commit comments