-3

Why Mule http inbound endpoint is always GET request. I'm logging type of http method and it always logs type is GET even I specified method type PUT in http inbound end
point.

 <http:inbound-endpoint exchange-pattern="request-response"
    path="testPath" doc:name="HTTP" 
    host="localhost" port="8083" 
    mimeType="application/json"
    method="PUT"/>

   <logger level="INFO" message="method type #[message.inboundProperties['http.method']]"
   doc:name="Logger"/>  <--- It always logs method is GET

   It never go into following expression block:

<choice doc:name="Choice">
   <when expression="#[message.inboundProperties['http.method']=='PUT']">

I would like to set http method as a "PUT" in http inbound endpoint

Neel
  • 303
  • 1
  • 4
  • 15
  • How are you making your HTTP requests? – Ale Sequeira Jul 30 '14 at 13:35
  • I'm making my http request through browser, using http://localhost:8083/testPath – Neel Jul 30 '14 at 16:54
  • So... your endpoint always receives an HTTP GET, right? – Ale Sequeira Jul 30 '14 at 17:39
  • So I have a Mule-Logger afte Http-inbound endpoint. I logs http method type in that logger.Is some one need to call my Http-inbound endpoint to get correct method type? Currently I'm calling my Http-inbound endpoint through browser only... – Neel Jul 30 '14 at 19:17

1 Answers1

0

The method attribute on http:inbound-endpoint is ineffective: you can put any value there, it won't change anything.

As Ale suggested, it's up to the HTTP client to use whatever method you want to receive on Mule's side.

David Dossot
  • 33,403
  • 4
  • 38
  • 72
  • Added following new questions about Mule publish/subscribe with Active-MQ http://stackoverflow.com/questions/25065799/mule-publish-subscribe-model-with-active-mq-how-to-invoke-tomcat-consumers-in-a – Neel Jul 31 '14 at 17:57