Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9130337
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T07:56:48+00:00 2026-06-17T07:56:48+00:00

In my sencha touch 2.1, after successful login a token is sent back from

  • 0

In my sencha touch 2.1, after successful login a token is sent back from service which has to be stored and used with all future service calls. Since I am dealing with remote web service so all the stores use JsonP proxy to fetch data which is why I want to add the token to all such calls. Since JsonP doesn’t support headers I am planning to add this token as url param but I am not sure how to do this for all JsonP calls originating from app.

A similar question for AJAX calls was found
Send user details (session token) within every AJAX requests (Sencha Touch 2)

but since JsonP does not support ‘beforerequest’ event and headers, I am stuck.

Is there any other event I can listen/intercept to add this url param? is there a way to write base proxy class which has this functionality? Please share some examples if you know how to do this.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T07:56:49+00:00Added an answer on June 17, 2026 at 7:56 am

    Ok, I found a way that worked for me.

    I extended JsonP proxy and in buildUrl method I appended cached token, and now I an using this proxy in all my stores. Here is the code:

    Ext.define('myshop.proxy.CustomJsonpProxy', {
      extend: 'Ext.data.proxy.JsonP',
      alias: 'proxy.customjsonpproxy',
      buildUrl: function(request) {
        var me      = this,
            url     = me.callParent(arguments);
        if(!Ext.isEmpty(loggedInUserToken)){
            url = Ext.urlAppend(url, "token="+loggedInUserToken);
        }
        return url;
      }
    });
    

    Please share if you know of other better ways.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I new in sencha touch and I make a simple login form wichh accepts
I am creating login system with Sencha Touch 2 . I am getting an
Im working with Sencha touch and I am trying to update a panel after
How to improve performance of Sencha Touch based application ? After spending couple of
I downloaded Sencha touch from this link Download for 2.1 GPL . Then I
I'm developing a blackberry webworks application using sencha touch . And after making build
I'm working on a Sencha Touch 2 application where I have a view which
I am trying to develop an application for iPad using Sencha touch which needs
I am new to Sencha Touch framework. I need to load some data from
After going through so many documents and online content like: http://stackoverflow.com/questions/4066167/sencha-touch-or-jquery-mobile http://stackoverflow.com/questions/5093691/sencha-touch-vs-jqtouch-vs-gwt-mobile-vs-xui-vs-jquery-mobile-vs http://www.quora.com/Were-deciding-between-jQuery-Mobile-currently-in-alpha-and-Sencha-Touch-What-are-the-pros-and-cons-for-each http://interfacethis.com/2011/adventures-in-html5-part-one/

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.