1. #1
    Sencha User
    Join Date
    Apr 2012
    Posts
    16
    Vote Rating
    0
    bino is on a distinguished road

      0  

    Default Unanswered: How to use extraParams on a REST proxy type?

    Unanswered: How to use extraParams on a REST proxy type?


    Hi,


    I was trying to replicate the following curl command from parse.com via store proxy


    Code:
    
    curl -X GET \
      -H "X-Parse-Application-Id: yxP7BAgM9ihPNEziVZ1JiwctxYpPbAhQz6ClgxAs" \
      -H "X-Parse-REST-API-Key: oa9SJWw7jcmcoMCdfqN8QISWBLlh572Z41gm6ke5" \
      -G \
      --data-urlencode 'where={"playerName":"Sean Plott"}' \
      https://api.parse.com/1/classes/GameScore

    with this Ext.data.Store declaration


    Code:
    
    Ext.define('MyApp.store.GameScores', {
    	extend: 'Ext.data.Store',
    	requires: ['Ext.data.proxy.Rest'],
    	config: {
    		storeId: 'gamescore',
    		model: 'MyApp.model.GameScore',
    		autoLoad: true,
    		proxy: {
    			type: 'rest',
    			useDefaultXhrHeader: false,
    			url: 'https://api.parse.com/1/classes/GameScore',
    			headers: {
    				'X-Parse-Application-Id':'yxP7BAgM9ihPNEziVZ1JiwctxYpPbAhQz6ClgxAs',
    				'X-Parse-REST-API-Key': 'oa9SJWw7jcmcoMCdfqN8QISWBLlh572Z41gm6ke5'
    			},
    			extraParams: {
    				'where': {
                                         'PlayerName':'Sean Plott'
                                    }
    			},
    			format: 'json',
    			reader: {
    				type: 'json',
    				rootProperty: 'results'
    			}
    		}
    	}
    });

    I can get results yes, but it seems that whatever I pass with the extraParams parameter it doesn't filter the query. It just lists all whatever is returned by parse.com Restful call.


    Is there anything I am missing?


    Thanks in advance.

  2. #2
    Sencha User
    Join Date
    Apr 2012
    Posts
    16
    Vote Rating
    0
    bino is on a distinguished road

      0  

    Default


    I've read from another post having the same question as mine here http://www.sencha.com/forum/showthread.php?186794 but since I am still new in sencha touch I have no idea where to start. Please help.

  3. #3
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    35,704
    Answers
    3356
    Vote Rating
    750
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Did you look at the request, is the extraParams being sent at least?
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    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 in print!

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

Thread Participants: 1

Tags for this Thread

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar