@@ -133,6 +133,11 @@ public Mutant params() {
133133 return req .params ();
134134 }
135135
136+ @ Override
137+ public <T > T params (final Class <T > type ) {
138+ return req .params (type );
139+ }
140+
136141 @ Override
137142 public Mutant param (final String name ) {
138143 return req .param (name );
@@ -173,6 +178,11 @@ public Mutant body() throws Exception {
173178 return req .body ();
174179 }
175180
181+ @ Override
182+ public <T > T body (final Class <T > type ) throws Exception {
183+ return req .body (type );
184+ }
185+
176186 @ Override
177187 public <T > T require (final Class <T > type ) {
178188 return req .require (type );
@@ -550,6 +560,16 @@ default Optional<MediaType> accepts(final MediaType... types) {
550560 */
551561 Mutant params ();
552562
563+ /**
564+ * Short version of <code>params().to(type)</code>.
565+ *
566+ * @param type Object type.
567+ * @return Instance of object.
568+ */
569+ default <T > T params (final Class <T > type ) {
570+ return params ().to (type );
571+ }
572+
553573 /**
554574 * Get a HTTP request parameter under the given name. A HTTP parameter can be provided in any of
555575 * these forms:
@@ -635,6 +655,17 @@ default List<Upload> files(final String name) {
635655 */
636656 Mutant body () throws Exception ;
637657
658+ /**
659+ * Short version of <code>body().to(type)</code>.
660+ *
661+ * @param type Object type.
662+ * @return Instance of object.
663+ * @throws Exception If body can't be converted or there is no HTTP body.
664+ */
665+ default <T > T body (final Class <T > type ) throws Exception {
666+ return body ().to (type );
667+ }
668+
638669 /**
639670 * The charset defined in the request body. If the request doesn't specify a character
640671 * encoding, this method return the global charset: <code>application.charset</code>.
0 commit comments