Created
August 27, 2015 18:57
-
-
Save dwelch2344/44aae8650042401c57a7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@FeignClient(url = "${app.api.someService.baseUrl}") | |
public interface SomeFeign { | |
@RequestMapping(method = RequestMethod.POST, value = "/steps/", | |
produces = "application/json") | |
Step createStep(@RequestBody Step step); | |
@RequestMapping(method = RequestMethod.PUT, value = "/steps/{stepId}", | |
produces = "application/json") | |
Step updateStep(@RequestBody Step step, @PathVariable("stepId") Long stepId); | |
} |
I'm not sure. @RequestBody
isn't needed.
Do you have a project you can share?
@spencergibb Unfortunately not. I was working on pulling it out to a POC when I took a last ditch shot at changing produces = "application/json"
to produces = "application/json", consumes = "application/json"
and it started playing nicely...
Any ideas why?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Running into an issue where feign always posts the data with content-type
application/x-www-form-urlencoded;charset=UTF-8
, even though I specifyapplication/json
. Is there some other config needed / annotation to use?