Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GET Request example not work in Kotlin #103

Open
glvoff opened this issue Sep 6, 2021 · 0 comments
Open

GET Request example not work in Kotlin #103

glvoff opened this issue Sep 6, 2021 · 0 comments

Comments

@glvoff
Copy link

glvoff commented Sep 6, 2021

I try use GET request example as presented in readme.md at section Hot to use it

Im creating simple console application in lates Intelij IDEA, adding gradle dependency like this

dependencies {
    implementation("org.cactoos:cactoos-http:0.0.1")
    testImplementation(kotlin("test"))
}

then in main function i wrote this

import org.cactoos.http.HtBody
import org.cactoos.http.HtResponse
import org.cactoos.text.TextOf
import java.io.File

fun main(args: Array<String>) {
    val body = TextOf(
        HtBody(
            HtResponse("http://www.google.com") // <-- at this point HtResponse want a second parameter before URL, some Wire.
        )
    ).asString()
}

If this code not suppose to work, tell me please how i should make simple GET request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant