Are they all just passed through by default to the target endpoint?
For example, a request to my API proxy looks like this:
http://myOrg-prod.apigee.net/weather/forecastrss?w=12345678
My TargetEndpoint specifies the <URL> of the backend service as:
http://yahoo.com/weather
When Edge makes the request to the backend service through the TargetEndpoint, does it by default:
So, by default, would the request to my backed looks like this:
http://myOrg-prod.apigee.net/weather/forecastrss?w=12345678
I know there are policies to manipulate the request, but I am interested only in the default action.
Thanks,
Stephen
Solved! Go to Solution.
I think the answer is 'yes' to all your questions, except for the last one where you ask "would the request to my backend look like this".
In the case of the weather API example, the request that Edge sends to the backend (which I copied directly from the Trace tool) is this:
GET https://weather.yahooapis.com/forecastrss?w=12797282
The proxypath suffix, /forecastrss, is retrieved from the client request and appended to the target URL as are any query parameters. The various parts of a request (like proxypath suffix) are described here: http://apigee.com/docs/api-services/reference/variables-reference. Request headers (from the client) are also passed unchanged in the target request. If the request contains a body (like with a POST), that content will be passed to the backend unchanged.
As you mentioned, you can make changes to the request headers, query params, and message using policies, and those changes will be passed in the target request. And anything you intentionally remove will not be sent. You can use the AssignMessage policy to do these kinds of operations. JavaScript policies are also commonly used for this.
Hope this helps. Any other feedback/confirmation would be welcome.
I think the answer is 'yes' to all your questions, except for the last one where you ask "would the request to my backend look like this".
In the case of the weather API example, the request that Edge sends to the backend (which I copied directly from the Trace tool) is this:
GET https://weather.yahooapis.com/forecastrss?w=12797282
The proxypath suffix, /forecastrss, is retrieved from the client request and appended to the target URL as are any query parameters. The various parts of a request (like proxypath suffix) are described here: http://apigee.com/docs/api-services/reference/variables-reference. Request headers (from the client) are also passed unchanged in the target request. If the request contains a body (like with a POST), that content will be passed to the backend unchanged.
As you mentioned, you can make changes to the request headers, query params, and message using policies, and those changes will be passed in the target request. And anything you intentionally remove will not be sent. You can use the AssignMessage policy to do these kinds of operations. JavaScript policies are also commonly used for this.
Hope this helps. Any other feedback/confirmation would be welcome.
User | Count |
---|---|
2 | |
1 | |
1 | |
1 | |
1 |