--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/main/scala/util/HttpMethod.scala Sun Nov 13 21:55:08 2011 -0500
@@ -0,0 +1,20 @@
+package org.w3.readwriteweb.util
+
+import unfiltered.request._
+
+// TODO pull request to the unfiltered project!
+object HttpMethod {
+ def unapply(req: HttpRequest[_]): Option[Method] =
+ Some(
+ req.method match {
+ case "GET" => GET
+ case "PUT" => PUT
+ case "HEAD" => HEAD
+ case "POST" => POST
+ case "CONNECT" => CONNECT
+ case "OPTIONS" => OPTIONS
+ case "TRACE" => TRACE
+ case m => new Method(m)
+ })
+
+}
\ No newline at end of file