Skip to content
Browse files

Fix for #122

  • Loading branch information...
1 parent 80278da commit 30298a0737124ad74b15b304f4d1890db3c0d99b @perwendel committed
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
View
9 src/main/java/spark/Request.java
@@ -102,6 +102,15 @@ protected Request() {
}
/**
+ * 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')
*
View
5 src/main/java/spark/webserver/RequestWrapper.java
@@ -89,6 +89,11 @@ public int 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.
Something went wrong with that request. Please try again.