http-builder-ng / gradle-http-plugin

Gradle plugin providing support for using HttpBuilder-NG to make HTTP requests as Gradle Tasks.
https://http-builder-ng.github.io/gradle-http-plugin/
Apache License 2.0
31 stars 8 forks source link

Unable to configure using kotlin #13

Closed jmeekhof closed 4 years ago

jmeekhof commented 4 years ago

I'm attempting to use this plugin using the kotlin DSL. Has anyone had any luck?


http {
    config {
        request.uri.set("${gHostUriType}://${gHost}:${gRestPort}")
    }
}

yields


  Line 33:         request.uri.set("${gHostUriType}://${gHost}:${gRestPort}")
                   ^ Unresolved reference: request
jmeekhof commented 4 years ago

Leave it to banging your head against a wall for a long time to figure something out.

http {
    config{
        it.request.setUri("${gHostUriType}://${gHost}:${gRestPort}")
    }
}