98
98
TODO
99
99
100
100
## Kotlin (okhttp3)
101
+
101
102
Here are the detailed instructions for running the generated API Dash code in Kotlin (using okhttp3) for macOS, Windows, and Linux:
102
103
103
- ### 1. Install Kotlin:
104
- To run Kotlin code, you need to install Kotlin first. You can install Kotlin from the official Kotlin website:
104
+ ### 1. Install Kotlin
105
+
106
+ To run Kotlin code, you need to install Kotlin by following the below instructions:
105
107
106
108
- Go to [ Kotlin Installation Guide] ( https://kotlinlang.org/docs/getting-started.html#install-kotlin ) for detailed steps.
107
- - Remember: ` Kotlin is included in each IntelliJ IDEA and Android Studio release. Download and install one of these IDEs to start using Kotlin ` .
109
+ - Kotlin is also included in IntelliJ IDEA and Android Studio. You can also download and install one of these IDEs to start using Kotlin.
108
110
109
- Once Kotlin is installed, proceed with adding ` okhttp ` and running the generated code.
111
+ ### 2. Add ` okhttp ` library
110
112
111
- ### 2. Add ` okhttp ` library:
112
113
To use ` okhttp3 ` in your Kotlin project, you need to include it as a dependency. If you're using ** Gradle** , follow these steps:
113
114
114
115
- Open the ` build.gradle ` file in your project.
@@ -120,25 +121,29 @@ implementation("com.squareup.okhttp3:okhttp:4.12.0")
120
121
121
122
- Sync your project to apply the dependency.
122
123
123
- ### 3. Execute the generated code:
124
+ ### 3. Execute the generated code
125
+
124
126
After setting up Kotlin and ` okhttp3 ` , follow these steps to run the generated code:
125
127
126
- 1 . ** Open your IDE** ✍️ (like Android Studio).
127
- 2 . ** Create a new Kotlin file** 📝 (or use an existing one).
128
- 3 . ** Copy the generated code** 📋 from API Dash.
129
- 4 . ** Paste the code** into the Kotlin file 🔄.
130
- 5 . ** Run the Kotlin file** by clicking the "Run" button in your IDE or by using the command line.
128
+ #### Using IDE
131
129
132
- #### If you're running from the command line:
133
- 1 . ** Navigate to the project directory** using the terminal or command prompt.
134
- 2 . ** Compile and run the Kotlin file** with these commands:
130
+ 1 . Open the installed IDE like Android Studio.
131
+ 2 . Create a new Kotlin file.
132
+ 3 . Copy the generated code from API Dash and paste it in the Kotlin file.
133
+ 4 . Run the Kotlin file by clicking the ` Run ` button in the IDE or by using the command line.
134
+
135
+ #### Using command line
136
+
137
+ 1 . Create a new Kotlin file.
138
+ 2 . Copy the generated code from API Dash and paste it in the Kotlin file (` api_test.kt ` ).
139
+ 3 . Navigate to the project directory using the terminal or command prompt.
140
+ 4 . Compile and run the Kotlin file by executing:
135
141
136
142
``` bash
137
143
kotlinc api_test.kt -include-runtime -d api_test.jar
138
144
java -jar api_test.jar
139
145
```
140
146
141
-
142
147
## PHP (curl)
143
148
144
149
TODO
0 commit comments