I need to consume the given API definition, But I am not able to find a function call that takes both headers and request body at documentation. Please suggest which function of RestTemplate to use here.
@RequestMapping(value = "/createObject", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)public ResponseEntity<CreateObjectOutput> createObject( @RequestBody CreateObjectInput req) { CreateObjectOutput out = new CreateObjectOutput(); ///// Some Code return new ResponseEntity<CreateObjectOutput>(out, HttpStatus.OK);}