Nikhil Parab
10/10/2024, 12:43 PMval client = HttpClient(CIO) {
defaultRequest {
url {
protocol = URLProtocol.HTTPS
host = "ktor.io"
path("docs/")
parameters.append("token", "abc123")
}
header("X-Custom-Header", "Hello")
}
}
but now I have to configure it in each block this way
client.get {
url {
protocol = URLProtocol.HTTPS
host = "ktor.io"
path("docs/welcome.html")
}
}
if i don't configure it separately , then the http method which goes to request become 1, instead of 2,
the default request method used to work, and is still working for a different env , but don't know what's wrong with my current env ?KR
10/10/2024, 2:14 PMNikhil Parab
10/10/2024, 2:16 PMKR
10/10/2024, 2:18 PMCIO
engine. And it doesn't support HTTP 2.KR
10/10/2024, 2:19 PM