-
- All Implemented Interfaces:
public final class JSONMockMvcKt
-
-
Method Summary
Modifier and Type Method Description final static ResultActionsDslgetForJSON(MockMvc $self, URI uri, Function1<MockHttpServletRequestDsl, Unit> block)Make a GET call to a MockMvc with the nominated URI, setting the Acceptheader toapplication/jsonto indicate that the expected response is JSON.final static ResultActionsDslgetForJSON(MockMvc $self, String urlTemplate, Object vars, Function1<MockHttpServletRequestDsl, Unit> block)Make a GET call to a MockMvc with the nominated URL (created from a URL template string and an optional set of variables), setting the Acceptheader toapplication/jsonto indicate that the expected response is JSON.final static ResultActionsDslpostForJSON(MockMvc $self, URI uri, Function1<MockHttpServletRequestDsl, Unit> block)Make a POST call to a MockMvc with the nominated URI, setting the Acceptheader toapplication/jsonto indicate that the expected response is JSON.final static ResultActionsDslpostForJSON(MockMvc $self, String urlTemplate, Object vars, Function1<MockHttpServletRequestDsl, Unit> block)Make a POST call to a MockMvc with the nominated URL (created from a URL template string and an optional set of variables), setting the Acceptheader toapplication/jsonto indicate that the expected response is JSON.-
-
Method Detail
-
getForJSON
final static ResultActionsDsl getForJSON(MockMvc $self, URI uri, Function1<MockHttpServletRequestDsl, Unit> block)
Make a GET call to a MockMvc with the nominated URI, setting the
Acceptheader toapplication/jsonto indicate that the expected response is JSON. Further details may be added to the request with the optional configuration lambda.
-
getForJSON
final static ResultActionsDsl getForJSON(MockMvc $self, String urlTemplate, Object vars, Function1<MockHttpServletRequestDsl, Unit> block)
Make a GET call to a MockMvc with the nominated URL (created from a URL template string and an optional set of variables), setting the
Acceptheader toapplication/jsonto indicate that the expected response is JSON. Further details may be added to the request with the optional configuration lambda.
-
postForJSON
final static ResultActionsDsl postForJSON(MockMvc $self, URI uri, Function1<MockHttpServletRequestDsl, Unit> block)
Make a POST call to a MockMvc with the nominated URI, setting the
Acceptheader toapplication/jsonto indicate that the expected response is JSON. Further details may be added to the request with the optional configuration lambda.
-
postForJSON
final static ResultActionsDsl postForJSON(MockMvc $self, String urlTemplate, Object vars, Function1<MockHttpServletRequestDsl, Unit> block)
Make a POST call to a MockMvc with the nominated URL (created from a URL template string and an optional set of variables), setting the
Acceptheader toapplication/jsonto indicate that the expected response is JSON. Further details may be added to the request with the optional configuration lambda.
-
-
-
-