Permalink
Browse files

Fix for #122

  • Loading branch information...
perwendel committed Mar 1, 2014
1 parent 80278da commit 30298a0737124ad74b15b304f4d1890db3c0d99b
Showing with 14 additions and 0 deletions.
  1. +9 −0 src/main/java/spark/Request.java
  2. +5 −0 src/main/java/spark/webserver/RequestWrapper.java
@@ -101,6 +101,15 @@ protected Request() {
splat = getSplat(requestList, matchedList);
}
+ /**
+ * Returns the map containing all route params
+ *
+ * @return a map containing all route params
+ */
+ public Map<String, String> params() {
+ return Collections.unmodifiableMap(params);
+ }
+
/**
* Returns the value of the provided route pattern parameter.
* Example: parameter 'name' from the following pattern: (get '/hello/:name')
@@ -88,6 +88,11 @@ public int hashCode() {
return delegate.hashCode();
}
+ @Override
+ public Map<String, String> params() {
+ return delegate.params();
+ }
+
@Override
public String params(String param) {
return delegate.params(param);

0 comments on commit 30298a0

Please sign in to comment.