hastebrot / protokola

Message Infrastructure.
Apache License 2.0
1 stars 0 forks source link

(feature) Transporter for Dolphin Platform communication on Java client. #2

Closed hastebrot closed 7 years ago

hastebrot commented 7 years ago

The transporter handles Request, Response, DolphinClientId, and SessionCookie.

fun main(args: Array<String>) {
    val client = OkHttpClient()

    val request = Request.Builder()
        .url("http://localhost:8080/dolphin")
        .post(RequestBody.create(
            MediaType.parse("application/json"),
            "[]"
        ))
        .build()

    val response = client.newCall(request).execute()
    println(response.body()!!.string())
}