Results 1 to 3 of 3

Thread: Ext.data.Request & JsonP

  1. #1

    Default Ext.data.Request & JsonP

    I have to submit Json object from Web as part of the request, based on what I read I came up with the following code:

    var proxy = Ext.create('Ext.data.proxy.JsonP', {

    });
    var request = Ext.create ('Ext.data.Request', {
    jsonData: '{ "getUserProfile:" {} }',
    headers: {
    Authorization: 'aiuth"'
    },
    method: 'POST',
    url: 'myserverurl',
    proxy: proxy

    });
    this.setProxy(proxy);

    this.load({
    callback: function(records, operation, success) {
    alert("Callback");
    // the operation object contains all of the details of the load operation
    console.log(records);
    },
    scope: this
    });

    It seems proxy and request are not connected. While "loading" I got :

    You are using server proxy but have not supplied it with a url. I have not seen other ways to connect "request" with "proxy.
    Any suggestions ?

  2. #2
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,379
    Answers
    3997

    Default

    You shouldn't really use the Request class yourself until you understand how you can use it. You should just configure the proxy and the load will be able to work.
    Mitchell Simoens @LikelyMitch

    Check out my GitHub:
    https://github.com/mitchellsimoens

    Posts are my own, not any current, past or future employer's.

  3. #3

    Default Thanks

    Thank you for your response. The minor problem that Request class is documented but its use is not, and that is exactly what I was trying to figure

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
  •