Curl POST-запрос к HTTP-запросу Mulesoft - PullRequest
0 голосов
/ 07 августа 2020

Требуется реализовать в следующем HTTP-запросе Mulesoft

curl "https://somedomain.com/1/1/1/search" -X ЗАПИСЬ -H «Авторизация: токен на предъявителя»

1 Ответ

1 голос
/ 07 августа 2020
<?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>

введите описание изображения здесь

...