Skip to content

Commit

Permalink
Resolve #363
Browse files Browse the repository at this point in the history
  • Loading branch information
decebals committed May 5, 2017
1 parent 377f3ba commit f91b9f6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pippo-core/src/main/java/ro/pippo/core/HttpConstants.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ public static final class Method {
/*
public static final String TRACE = "TRACE";
public static final String CONNECT = "CONNECT";
public static final String OPTIONS = "OPTIONS";
*/
public static final String OPTIONS = "OPTIONS";

// not really a method (marker for all methods)
public static final String ALL = "ALL";
Expand Down
11 changes: 11 additions & 0 deletions pippo-core/src/main/java/ro/pippo/core/route/Route.java
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,17 @@ public static Route PATCH(String uriPattern, RouteHandler routeHandler) {
return new Route(HttpConstants.Method.PATCH, uriPattern, routeHandler);
}

/**
* Create an OPTIONS route.
*
* @param uriPattern
* @param routeHandler
* @return
*/
public static Route OPTIONS(String uriPattern, RouteHandler routeHandler) {
return new Route(HttpConstants.Method.OPTIONS, uriPattern, routeHandler);
}

/**
* Create a ALL route.
*
Expand Down

0 comments on commit f91b9f6

Please sign in to comment.