MuleSoft · HTTP Connector

HTTP:METHOD_NOT_ALLOWED

Short answer

HTTP:METHOD_NOT_ALLOWED means the server does not support the request method for the target resource (HTTP 405). Change the method on the HTTP Request operation to one the resource accepts.

VerifiedLast verified

01Error text

MuleSoft error
Error type: HTTP:METHOD_NOT_ALLOWED

02Likely causes

  • The server request method is not supported by the target resource.
  • By default, HTTP Connector raises an error for any response with a status code of 400 or above.

03How to fix it

  1. Check which methods the target API allows for this resource.
  2. Set the Method on the HTTP Request operation to an allowed one, and check that the path points at the resource you intended.
  3. Turn on HTTP wire logging to see the exact request and response: in log4j2.xml, enable the logger org.mule.service.http.impl.service.HttpMessageLogger at DEBUG level.
  4. Handle the failure with an error handler of type HTTP:METHOD_NOT_ALLOWED.

04Official documentation

Test every fix in a non-production environment before you apply it to production. See how entries are verified.

More for MuleSoft work:Open MuleSoft jobsMuleSoft rates and salariesHire a senior MuleSoft developer

The iPaaS Brief

Subscribe to The iPaaS Brief.

The iPaaS newsletter for the people who run integrations. From iPaaS Group.

Free. You finish on theipaasbrief.com and confirm by email.