Merge pull request #4683 from neerajnyd/BAEL-1982

Bael 1982 Test a Spring REST API with curl
This commit is contained in:
Eric Martin 2018-07-21 09:42:58 -05:00 committed by GitHub
commit 93bc08a7c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 15 additions and 0 deletions

View File

@ -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;
}
} }