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](http://myOrg-prod.apigee.net/weather/forecastrss?w=12345678)
My TargetEndpoint specifies the of the backend service as:
[http://yahoo.com/weather](http://yahoo.com/weather)
When Edge makes the request to the backend service through the TargetEndpoint, does it by default:
- Append the resource to the target endpoint request? In this case â/forecastrssâ
- Append all query params from the proxy request to the target endpoint request? In this case â?w=12345678â
- Copy all headers from the proxy request to the target endpoint request?
- Copy the request body, if any, to the target endpoint request?
- Add any Apigee-specific headers to the request to the backend?
So, by default, would the request to my backed looks like this:
[http://myOrg-prod.apigee.net/weather/forecastrss?w=12345678](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
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.
1 Like