Scala wrapper around Java.net Http Client with automatic case class support for json and xml (Circe and Aenea)
Sync Example:
import io.circe.generic.auto._
import zeab.j2sjavanethttpclient.httpclient.HttpClient
HttpClient.invokeHttp[String, String](http://google.com)
Async Example:
import io.circe.generic.auto._
import zeab.j2sjavanethttpclient.httpclient.HttpClient
HttpClient.invokeAsyncHttp[String, String](http://google.com)
Request and Response Bodys:
import io.circe.generic.auto._
import zeab.j2sjavanethttpclient.httpclient.HttpClient
case class MyRequest(id:String)
case class MyResponse(id:String)
HttpClient.invokeHttp[MyRequest, MyResponse](http://google.com, "POST", MyRequest("1"), Map("Content-Type" -> "application/json", "Accept" -> "application/json"))
Performance Mode (skips dealing with the response body completely):
import io.circe.generic.auto._
import zeab.j2sjavanethttpclient.httpclient.HttpClient
HttpClient.invokeHttp[String, NoBody](http://google.com)