我正在尝试使用Camel with Spring Boot拨打GET电话。当我使用下面的代码时,我得到了406代码。但如果我尝试使用postman访问端点,我会得到200个响应(json)。请帮忙。
from(RouteUtils.buildSedaEndpointWithConcurrentConsumers("sedaEndpointin", domain.getThreads()))
.routeId("routeiD")
.setProperty("workerId").jsonpath("$.worker_id")
.setHeader(Exchange.HTTP_METHOD, constant(HttpMethods.GET))
.setHeader(Exchange.HTTP_QUERY, simple(String.format("key=%s&barcode=${exchangeProperty.workerId}", apiKey)))
.setHeader(Exchange.HTTP_URI, simple("https://" + endpoint))
.setHeader("Authorization", simple(Auth))
.setHeader("Content-Type", constant("application/json"))
.to("http4://" + Endpoint)
.to("sedaEndpoint");