Как бороться с «feign.FeignException: [301 перемещено постоянно] во время [GET]»? - PullRequest
0 голосов
/ 18 июня 2020

Я пытаюсь сделать запрос с FeignClient в моем приложении Spring-Boot на https://pixabay.com/api?key=17079440-d2facf535011df5d60e5ccfe2&q=Playstation%203&image_type=photo, но это исключение было выброшено:

2020-06-17 21:10:24.730 ERROR 14008 --- [nio-8080-exec-1] o.a.c.c.C.[.[.[/].[dispatcherServlet]    : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is feign.FeignException: [301 Moved Permanently] during [GET] to [https://pixabay.com/api?key=17079440-d2facf535011df5d60e5ccfe2&q=Playstation%203&image_type=photo] [PixabayClient#getImageUrl(String,String,String)] 

https://pastebin.com/yeNbcP5k

Я уже пытался сделать запрос через почтальона и браузер, и ответ был возвращен нормально: (

Вот мой класс FeignClient: https://pastebin.com/MFhFs5um

А вот и мой пом. xml: https://pastebin.com/4XXjYkyE

...