Merge pull request #4683 from neerajnyd/BAEL-1982
Bael 1982 Test a Spring REST API with curl
This commit is contained in:
commit
93bc08a7c9
|
@ -45,4 +45,19 @@ public class FooController {
|
||||||
.setName("Foo Name")
|
.setName("Foo Name")
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@RequestMapping(method = RequestMethod.POST, value = "/foos/new")
|
||||||
|
@ResponseStatus(HttpStatus.OK)
|
||||||
|
@ResponseBody
|
||||||
|
public Foo createFoo(@RequestBody final Foo foo) {
|
||||||
|
return foo;
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping(method = RequestMethod.DELETE, value = "/foos/{id}")
|
||||||
|
@ResponseStatus(HttpStatus.OK)
|
||||||
|
@ResponseBody
|
||||||
|
public long deleteFoo(@PathVariable final long id) {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue