Results 1 to 3 of 3

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

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Sencha User
    Join Date
    Oct 2012
    Location
    Poland
    Posts
    70
    Answers
    4
    Vote Rating
    5
      0  

    Default 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.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •