Skip to content

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

RestEasyScala

The simplest REST client imaginable, in Scala!

Looking through options for REST clients in Scala I found many that were way over kill for what I needed. I wrapped one of them in a super simple String => Try[String] interface. My suggestion would be to pick your favorite data encoder/decoder, I like Argonaut for JSON, and add a layer on top of this.

Usage

Run your own client

  val client = RestClient.defaultClient
  client.get(...)
  client.terminate()

Run a client which cleans itself up

  RestClient.withDefaultClient { client => 
    val getResult = client.get(...)
    val postResult = client.post(...)
  }

Create a client per call, cleaning up after each

  RestClient.get(...)

About

The simplest REST client imaginable, in scala!

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages