I'm trying to send a POST request with dynamic authorization header and form-urlencoded body but I'm getting this exception:
Caused by: java.lang.IllegalStateException: Method has too many Body parameters: public abstract perosnal.matcher.model.TokenDto perosnal.matcher.client.SpotifyAuthorizationClient.getToken(java.lang.String,perosnal.matcher.client.TokenRequestDto)
My client:
@FeignClient(name = "Spotify-Authorization-API", url = "https://accounts.spotify.com")
public interface SpotifyAuthorizationClient {
@RequestMapping(method = POST, value = "/api/token", produces = "application/x-www-form-urlencoded")
@Headers("Authorization: {authorization}")
TokenDto getToken(@Param("authorization") String authorization,
TokenRequestDto tokenRequestDto
);
}