Hi,
I am looking to send a POST request in Apigee instead of the default GET.
I have used AssignMessage policy to set the <Verb> to POST. Is this the only way to achieve this or are there any cleaner means to achieve this?
Dear @apigee1234567 ,
You can make a POST request by setting a flow with Verb Post. See attached screenshots.
Clic on + icon next to default in Proxy EndPoints.
OR
Just change the Verb from GET to POST in flow condition.
<Flows> <Flow name="hello"> <Condition>(proxy.pathsuffix MatchesPath "/hello") and (request.verb = "POST")</Condition> <Description/> <Request/> <Response/> </Flow> </Flows>
Cheers,
Anil Sagar
Hello @Anil Sagar
Thanks for the prompt reply. But adding a flow variable means changing the URL to include /hello at the end in the case described above.
If I do not want to change the URL and still send POST, is there a better way than using AssignMessage policy??
Dear @apigee1234567 ,
It's just an example. You can have same path to both GET & POST. Change the path to / to hit default end point.
Cheers,
Anil Sagar
@apigee1234567 , If above issue is resolved, Don't forget to hit "Accept" below the answer that fully addressed your question. It ensures that the next user with the same question will have the best answer at their fingertips.
User | Count |
---|---|
2 | |
1 | |
1 | |
1 | |
1 |