将POST请求卷曲到Mulesoft HTTP请求

时间:2020-08-07 07:33:44

标签: https mulesoft

希望在下面的Mulesoft HTTP请求中实现

卷曲“ https://somedomain.com/1/1/1/search”
-X POST
-H“授权:不记名令牌”

1 个答案:

答案 0 :(得分:1)

<?xml version="1.0" encoding="UTF-8"?>

<mule xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns="http://www.mulesoft.org/schema/mule/core"
    xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd">
    <flow name="MyRequestFlow" doc:id="04948f48-2508-4f1c-83fe-ea899886a61c" >
        <http:request method="POST" doc:name="Request" doc:id="bd921beb-2142-4c24-be1d-c174e994c982" url="https://somedomain.com/1/1/1/search">
            <http:headers ><![CDATA[#[output application/java
---
{
    "Authorization" : "Bearer token"
}]]]></http:headers>
        </http:request>
    </flow>
</mule>

enter image description here