The code below makes an HTTP POST request to example.com and outputs the response code to the console.
Put the lines of code in the correct order and set the indentation.
The code below makes an HTTP POST request to example.com and outputs the response code to the console.
Put the lines of code in the correct order and set the indentation.
}
val client = HttpClient(CIO)
}
val response: HttpResponse = client.post("https://example.com") {
append(HttpHeaders.Accept, "application/json")
println(response.status)
client.close()
headers {
Create a free account to access the full topic