scommons-api alternatives and similar packages
Based on the "HTTP" category.
Alternatively, view scommons-api alternatives based on common mentions on social networks and blogs.
-
Spray
DISCONTINUED. A suite of scala libraries for building and consuming RESTful web services on top of Akka: lightweight, asynchronous, non-blocking, actor-based, testable -
requests-scala
A Scala port of the popular Python Requests HTTP client: flexible, intuitive, and straightforward to use. -
Newman
DISCONTINUED. A REST DSL that tries to take the best from Dispatch, Finagle and Apache HttpClient. See here for rationale. -
Tubesocks
A comfortable and fashionable way to have bi-directional conversations with modern web servers. -
jefe
Manages installation, updating, downloading, launching, error reporting, and more for your application.
CodeRabbit: AI Code Reviews for Developers

Do you think we are missing an alternative of scommons-api or a related project?
README
scommons-api
Common REST API Scala/Scala.js components
How to add it to your project
val scommonsApiVer = "1.0.0-SNAPSHOT"
libraryDependencies ++= Seq(
// shared
"org.scommons.api" %%% "scommons-api-core" % scommonsApiVer,
"org.scommons.api" %%% "scommons-api-joda-time" % scommonsApiVer,
// client/js only
"org.scommons.api" %%% "scommons-api-xhr" % scommonsApiVer,
// server/jvm only
"org.scommons.api" %% "scommons-api-play-ws" % scommonsApiVer
)
Latest SNAPSHOT
version is published to Sonatype Repo, just make sure you added
the proper dependency resolver to your build.sbt
settings:
resolvers += "Sonatype Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots/"
How to use it
Joda Date/Time
You can use in your shared API data case classes date/time types from the joda library:
import org.joda.time._
import play.api.libs.json._
case class User(firstName: String,
lastName: String,
registeredAt: DateTime,
birthDate: LocalDate,
birthTime: LocalTime)
object User {
// you only need to provide appropriate implicits:
import scommons.api.jodatime.JodaTimeImplicits.{dateTimeReads => dtReads, dateTimeWrites => dtWrites}
import scommons.api.jodatime.JodaTimeImplicits.{dateReads => dReads, dateWrites => dWrites}
import scommons.api.jodatime.JodaTimeImplicits.{timeReads => tReads, timeWrites => tWrites}
implicit val jsonFormat: Format[User] = Json.format[User]
}
For JS
part the following types are defined as wrappers around
the corresponding ISO time formatted string
and do not contain any logic:
- [DateTime](joda-time/js/src/main/scala/org/joda/time/DateTime.scala) => [tests](joda-time/js/src/test/scala/org/joda/time/DateTimeSpec.scala)
- [LocalDate](joda-time/js/src/main/scala/org/joda/time/LocalDate.scala) => [tests](joda-time/js/src/test/scala/org/joda/time/LocalDateSpec.scala)
- [LocalTime](joda-time/js/src/main/scala/org/joda/time/LocalTime.scala) => [tests](joda-time/js/src/test/scala/org/joda/time/LocalTimeSpec.scala)
Once you receive from an API on JS
side an object that uses them
you can use toString
method to get an ISO time formatted string
and pass it to your favorite JS time library
to parse it.
For example, you could use standard JS Date class to parse it:
import scala.scalajs.js
new js.Date(user.registeredAt.toString).getDate
How to Build
To build and run all the tests use the following command:
sbt test
Documentation
You can find more documentation here