0

I'm setting up wso2 api manager. The issue is when i request a rest API from wso2 to backend, the request is always GET method irrespective of wso2's request method.

The wso2 server hits the backend as GET method even if my requested API is POST method.

sample request

curl -X POST \
   https://wso2.oasys.co/v1/login \
   -H 'Accept: */*' \
   -H 'Authorization: Bearer 1e258be1-b3f8-304d-8e04-f3af78a400a7' \
   -d '{
"username" : "username",
"password" : "password"
   }'

sample response

{
"timestamp": 1556267728729,
"status": 405,
"error": "Method Not Allowed",
"message": "Request method 'GET' not supported",
"path": "/login"
}

1 Answers1

0

How is this specified at the resource level in the API definition ? You can view this either as a swagger.json in the API manager console or as an XML file under \repository\deployment\server\synapse-configs\default\api. I'm using version 2.6.0 as a reference.

Does the resource have GET and POST as allowed methods? It seems odd that a GET would be sent for a POST request.