PDA

View Full Version : Proxy appendId adds duplicate / double id



benjamineberle
19 Nov 2012, 1:27 AM
To add parameters to an API query, I use the url path as well as the query string. Url only would be

/cust/prod/123?_dc=123456789

As soon as I add extraParams in the proxy config, I get something like this

/cust/prod/123?_dc=123456789&someparam=sth&id=123

Is the duplicate id in there something avoidable or desirable?

Thanks!

mitchellsimoens
21 Nov 2012, 9:25 AM
It's two different things. The Rest proxy will add the id and not look at the params.

benjamineberle
21 Nov 2012, 6:28 PM
Sorry, I don't properly understand what you mean.
With two Ids in there, my API controller can grab the same value from two different variables and I guess this redundancy is not intended by design.

With appendId = true, if I don't set the extraParams, the id is added to the URL path only. As soon as I add any extraParams, I have it in the URL path and the query string at the same time. Both ids are added automatically.
With appendId = false, there is no id appended.

Does that make sense?

benjamineberle
2 Dec 2012, 6:25 PM
Maybe I better change my question:

Can I avoid that the id is added to the params string when I have it already in the URL path?