val httpService = new RhoService {
GET / "hello" / 'world +? param[Int]("fav") |>> { (world: String, fav: Int) =>
Ok(s"Received $fav, $world")
}
}
See the wiki and the tests for more examples.
The primary goal of ρ is to provide an easy to use AST with which to build HTTP services which can be inspected to extract a variety of information including:
- Swagger documentation
- HAL documentation
Rho artifacts are available at Maven Central and snapshots are available from the Sonatype repositories.
Read the Rho Scaladocs
resolvers += Resolver.sonatypeRepo("snapshots")
libraryDependencies += "org.http4s" %% "rho-swagger" % version
ρ remains a work in progress. However, it is now approaching a point where things are beginning to stabilize. Going forward changes to the api should will come more slowly and have deprecation period.
Contributions of all kinds are welcome! Documentation contributions are especially useful for others who are also just learning to use ρ. The wiki and the tests are the primary source of documentation. Pull requests are greatly appreciated from their original authors, licensed to the http4s project under the project's open source license.
ρ is licensed under the terms of the Apache 2.0 license. See the license file in the base directory for more information.