1. #1
    Sencha Premium Member
    Join Date
    Jun 2012
    Posts
    67
    Vote Rating
    2
    Answers
    4
    benjamineberle is on a distinguished road

      0  

    Default Unanswered: Proxy appendId adds duplicate / double id

    Unanswered: Proxy appendId adds duplicate / double id


    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!

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    St. Louis, MO
    Posts
    34,107
    Vote Rating
    453
    Answers
    3155
    mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of

      0  

    Default


    It's two different things. The Rest proxy will add the id and not look at the params.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    http://www.JSONPLint.com - Source to lint your JSONP!

    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha Premium Member
    Join Date
    Jun 2012
    Posts
    67
    Vote Rating
    2
    Answers
    4
    benjamineberle is on a distinguished road

      0  

    Default


    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?

  4. #4
    Sencha Premium Member
    Join Date
    Jun 2012
    Posts
    67
    Vote Rating
    2
    Answers
    4
    benjamineberle is on a distinguished road

      0  

    Default


    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?