0
如何在apache駱駝中設置ahc組件的授權標頭?我總是碰到org.springframework.web.client.HttpClientErrorException:401授權必需的錯誤。下面是我的示例代碼:如何在apache駱駝中設置授權標頭:ahc
<route id="someRouteId">
<from uri="timer://runOnce?period=5s&repeatCount=1"></from>
<setHeader headerName="Authorization">
<constant>Basic eWFtYW4pLm5haXJAbWF5bGFiLm19OnlhbWvbgFGH=</constant>
</setHeader>
<to uri="ahc:https://<someurl>"></to>
<process ref="processX"></process>
<to uri="bean:beanX?method=methodX"></to>
</route>