|
@ -97,14 +97,12 @@ public class HttpRequestHandler { |
|
|
* Multiple parameters given (see that 'method' can have multiple values assigned |
|
|
* Multiple parameters given (see that 'method' can have multiple values assigned |
|
|
* Just a brief example/demonstration |
|
|
* Just a brief example/demonstration |
|
|
* NOTE: MIME type 'x-www-form-urlencoded' works with curl, at least. Change it if needed. |
|
|
* NOTE: MIME type 'x-www-form-urlencoded' works with curl, at least. Change it if needed. |
|
|
* curl 'http://localhost:8080/hello' --data 'location=moon&name=John' |
|
|
|
|
|
|
|
|
* curl 'http://localhost:8080/index' --data 'location=moon&name=John' |
|
|
* |
|
|
* |
|
|
*/ |
|
|
*/ |
|
|
@RequestMapping( |
|
|
@RequestMapping( |
|
|
value = { helloPageURL }, |
|
|
value = { helloPageURL }, |
|
|
method = { RequestMethod.POST }, |
|
|
|
|
|
produces = { "application/html" }, |
|
|
|
|
|
consumes = "application/x-www-form-urlencoded", |
|
|
|
|
|
|
|
|
method = { RequestMethod.GET }, |
|
|
params = { "location", "name" } |
|
|
params = { "location", "name" } |
|
|
) |
|
|
) |
|
|
public ResponseEntity<String> getNameAndLocation( |
|
|
public ResponseEntity<String> getNameAndLocation( |
|
|