Open elect86 opened 3 years ago
I'd like to replace the usage of crude shell commands with a nice library, and kohttp looks quite promising
One example I'm testing against, it's from gradle kts exec{}:
exec{}
commandLine("curl", "-X", "GET", "-H", "Authorization: token $token", "https://api.github.com/repos/kotlin-graphics/mary/contents/$path")
I tried to port that over to kohttp
val response = httpGet { host = "https://api.github.com/repos/kotlin-graphics/mary/contents/$path" header { "-H" to "Authorization: token $token" } }
But unfortunately, all I get is:
What went wrong: Execution failed for task ':publishToGithub'. unexpected host: https://api.github.com/repos/kotlin-graphics/mary/contents/mattei.txt
What am I doing wrong?
Ps: sorry for asking this here if this is not the right place to
I'd like to replace the usage of crude shell commands with a nice library, and kohttp looks quite promising
One example I'm testing against, it's from gradle kts
exec{}
:I tried to port that over to kohttp
But unfortunately, all I get is:
What am I doing wrong?
Ps: sorry for asking this here if this is not the right place to