Skip to content

Latest commit

 

History

History
33 lines (27 loc) · 755 Bytes

File metadata and controls

33 lines (27 loc) · 755 Bytes

HttpEntity

HttpEntity is more or less identical to using @RequestBody but is based on a container object that exposes request headers and the body. The following example uses an HttpEntity:

Java
@PostMapping("/accounts")
public void handle(HttpEntity<Account> entity) {
	// ...
}
Kotlin
@PostMapping("/accounts")
fun handle(entity: HttpEntity<Account>) {
	// ...
}