Skip to content
Browse files

Merge pull request #73 from stephenjudkins/options-request

Add support for OPTIONS request
  • Loading branch information...
2 parents b361f0c + 8bf1f32 commit c35f9cd620a53655d862635201c06fd30aa39735 @n8han n8han committed Apr 23, 2012
Showing with 3 additions and 0 deletions.
  1. +1 −0 core/src/main/scala/executor.scala
  2. +2 −0 core/src/main/scala/requests.scala
View
1 core/src/main/scala/executor.scala
@@ -64,6 +64,7 @@ trait HttpExecutor extends RequestLogging {
case HttpGet.METHOD_NAME => new HttpGet(req.path)
case HttpHead.METHOD_NAME => new HttpHead(req.path)
case HttpDelete.METHOD_NAME => new HttpDelete(req.path)
+ case HttpOptions.METHOD_NAME => new HttpOptions(req.path)
case method =>
val message = method match {
case HttpPost.METHOD_NAME => new HttpPost(req.path)
View
2 core/src/main/scala/requests.scala
@@ -222,6 +222,8 @@ class RequestVerbs(subject: Request) {
/** HTTP head request. See >:> to access headers. */
def HEAD = subject.copy(method="HEAD")
+ /** HTTP options request. */
+ def OPTIONS = subject.copy(method="OPTIONS")
/** @return URI based on this request, e.g. if needed outside Disptach. */
def to_uri = URI.create(subject.host.toURI).resolve(subject.path)

0 comments on commit c35f9cd

Please sign in to comment.
Something went wrong with that request. Please try again.