Reputation: 1
I am using WSO2 Micro Integrator to call a native API that works successfully when tested directly via Postman, returning a 200 status code. However, when calling the same API through the Micro Integrator, I'm encountering "Bad Request 400" (Your browser sent an invalid request) error.
Here, the following error response:
<html>
<body>
<h1>400 Bad Request</h1>
Your browser sent an invalid request.
</body>
</html>
Here is the <inSequence>
configuration I am using in my proxy service:
<inSequence>
<enrich>
<source clone="true" type="body"/>
<target property="jwtToken" type="property"/>
</enrich>
<class name="TokenClassGen.TokenClassGen"/>
<property expression="fn:concat('Bearer ', get-property('jwtToken'))"
name="Authorization"
scope="transport"
type="STRING"/>
<call>
<endpoint>
<http method="get" uri-template="https://NATIVE-URL">
<suspendOnFailure>
<initialDuration>-1</initialDuration>
<progressionFactor>-1</progressionFactor>
<maximumDuration>0</maximumDuration>
</suspendOnFailure>
<markForSuspension>
<retriesBeforeSuspension>0</retriesBeforeSuspension>
</markForSuspension>
</http>
</endpoint>
</call>
<respond/>
</inSequence>
When I test the same request directly via Postman (with the same token and query), it works fine and returns a 200 status code.
What could cause a 400 Bad Request error in this context when using WSO2 Micro Integrator?
Could the issue be related to how query parameters are encoded or how the request is constructed?
Are there specific configurations or debugging tips for ensuring compatibility with APIs that work in Postman but fail via WSO2 Micro Integrator?
Upvotes: 0
Views: 55
Reputation: 11
Since it's a bad request.
Have a nice day.
Upvotes: 0