search cancel

CA API Gateway: Sending a request body in the HTTP route assertion

book

Article ID: 112691

calendar_today

Updated On:

Products

STARTER PACK-7 CA Rapid App Security CA API Gateway

Issue/Introduction



How can a request body be sent to a target URL using the 'Route via HTTP(s)' assertion?

Environment

Release:
Component: APIESM

Resolution

1. Create a new context variable:
  • Name: Provide your desired name, i.e: Payload
  • Data Type: Message
  • Content-Type: Change to the desired content type
  • Expression: Change this to your desired request body

For example, if you want to post a username and password to the endpoint
 
  • Name: Payload
  • Data Type: Message
  • Content-Type: application/x-www-form-urlencoded
  • Expression: username=joe&password=7layer

2. Add a 'Route via HTTP(s)' assertion to the policy. This must appear somewhere below the context variable created above
3. Open the properties dialog for the route assertion
4. On the main screen enter your desired URL
5. For the 'Request Source' field select the message variable we created above
6. Save and activate the policy

Attachments

1558536751937KB000112691.zip get_app