[英]How to specify more than 1 content type for a mule inbound endpoint
我們使用m子在其中部署一些服務。
對於我們的一項服務,輸入可以是application / xml或application / json。 如何為同一個入站端點指定多種內容類型。
當我們只處理一種內容類型時,就是這樣。
<https:inbound-endpoint address="https://localhost:43123/v1/cars"
exchange-pattern="request-response" contentType="application/xml">
<mule-ss:http-security-filter realm="mule-realm" />
</https:inbound-endpoint>
我如何指定上述入站點應該能夠處理'application / xml'和'application / json'的內容類型
contentType
屬性對入站 HTTP端點沒有任何影響。
只需刪除它, http.headers
使用以下表達式檢查名為http.headers
的入站屬性中的實際內容類型: #[message.inboundProperties['http.headers']['Content-Type']]
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.