HMT
HMT

Reputation: 2271

HTTP:TIMEOUT error through mule request connector but api working through postman

I am using mule-4. I am trying to integrate a third-party API(confidential). It is working from the postman and is returning responses within 1 second. When I wrote a request connector for the same in mule, The API kept giving a timeout exception. I increased the response timeout to 2 minutes then also got the same error i.e. timeout exceeded. Please help.

EDIT 1:

I was able to reproduce this issue on postman. SO postman is adding Connection:keep-alive header by default and when this particular header is added then the API gives response within seconds but when this header is missing then the API gives a timeout error.

Upvotes: 1

Views: 5612

Answers (1)

aled
aled

Reputation: 25837

You are not really providing too much details of the issue. I can give some generic guidelines:

  1. Ensure that there is network connectivity. If you are testing Postman and Mule from the same computer it is probably not an issue.
  2. Ensure host, port and certificates (if using TLS) are the same. Pointing an HTTPS request to port 80 could cause a timeout sometimes.
  3. Enable HTTP Wire logging in Mule and compare with Postman code as HTTP to identify any significant difference between the requests. For example: headers, URI, body should be the same, except probably for a few headers. Depends on the API. This is usually the main cause for differences between Postman and Mule, when the request are different.

Upvotes: 1

Related Questions