fr.simply.RestVerb.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of simplyscala-server_2.9.2 Show documentation
Show all versions of simplyscala-server_2.9.2 Show documentation
provides a fast & ultra-lightweight http server with an API dedicated to define server’s routes (request-response), start & stop server
The newest version!
package fr.simply
class RestVerb(restVerb: String) {
override def toString = restVerb
}
case object Get extends RestVerb("GET")
case object Post extends RestVerb("POST")
/*class Method(method: String) {
def unapply[T](req: HttpRequest[T]) =
if (req.method.equalsIgnoreCase(method)) Some(req)
else None
}
object GET extends Method("GET")
object POST extends Method("POST")
object PUT extends Method("PUT")
object DELETE extends Method("DELETE")
object HEAD extends Method("HEAD")
object CONNECT extends Method("CONNECT")
object OPTIONS extends Method("OPTIONS")
object TRACE extends Method("TRACE")
object PATCH extends Method("PATCH")
object LINK extends Method("LINK")
object UNLINK extends Method("UNLINK")*/
© 2015 - 2025 Weber Informatics LLC | Privacy Policy