我试图向后端api发送一个put请求,但是我需要一个令牌,它可以处理get请求,所以问题不在于令牌,而是当我发出请求时,响应被202接受,并且不更新数据库。
这是代码
<resource methods="PUT" uri-template="/Nurse">
<inSequence>
<enrich>
<source clone="true" type="body"/>
<target property="payload" type="property"/>
</enrich>
<property action="remove" name="REST_URL_POSTFIX" scope="axis2"/>
<call blocking="true" description="">
<endpoint>
<address format="get" uri="http://192.168.20.1:8280/loginAPI/login"/>
</endpoint>
</call>
<property expression="json-eval($.accessToken)" name="token" scope="default" type="STRING"/>
<property expression="fn:concat('Bearer ',$ctx:token)" name="Authorization" scope="transport" type="STRING"/>
<enrich description="Restore original payload">
<source property="payload" type="property"/>
<target type="body"/>
</enrich>
<send>
<endpoint key="PutNurseEp"/>
</send>
</inSequence>
<outSequence>
<send/>
</outSequence>
<faultSequence/>
</resource>有人能帮上忙吗?这里有什么问题?
发布于 2019-11-06 10:17:48
解决了这个问题,错误发生在邮递员的请求上,我在乞讨url上加了一个空格。
https://stackoverflow.com/questions/58698065
复制相似问题