These are chat archives for spring-cloud/spring-cloud

24th
Oct 2015
turick
@turick
Oct 24 2015 21:30
i've spent a little time trouble shooting this but having time finding anything to help me figure out what i'm doing wrong. i built a feign client with the following method:
@RequestMapping(value = "/sendPrivateNotification", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE)
void sendPrivateNotification(String channel, String message, String user);
I'm getting an IllegalStateException stating "Method has too many Body parameters"
I typically use @RequestBody on posts to deserialize a POST to a DTO, but in this case, I just want to post some parameters that will be read by the remote controller as strings. is there something i'm not taking into consideration that i should?
or does the feign client require that you use a single object with @RequestBody?
for a POST
turick
@turick
Oct 24 2015 21:51
well i may have answered my own question. reducing the feign client down to a single parameter eliminated the error. is it possible to POST without a DTO... just a list of parameters? perhaps a map?