Threaded View

  1. #1
    Sencha User
    Join Date
    Oct 2012
    Location
    Poland
    Posts
    70
    Answers
    4
    Vote Rating
    5
    szimek is on a distinguished road

      0  

    Default Answered: How pass additional parameters to index action in Rest proxy?

    Answered: How pass additional parameters to index action in Rest proxy?


    Hi,

    I'd like to add a static param to be sent when fetching records using Rest proxy. I tried adding it to "extraParams" in proxy config, but then they are sent on *every* request, while I want them to be sent only on index action.

    Also, I'm currently dynamically adding authentication token to every request in "beforeload" and "beforesync" listeners (it sucks that extraParams can't be a function that returns an object).

    What's the best way to add custom params just to "index" requests?

    Cheers,
    Szymon

  2. As the docs state, extraParams will be included in every request so yes, you would have to listen to beforeload/beforesync to add params to the request.

Thread Participants: 1

Tags for this Thread