1. #1
    Sencha User
    Join Date
    Dec 2013
    Location
    Taguig City, Philippines
    Posts
    2
    Vote Rating
    0
    marc.dejoya021 is on a distinguished road

      0  

    Default Unanswered: Send long data using JSONP?

    Unanswered: Send long data using JSONP?


    I want to send long text and save it in a database hosted online.
    But I'm getting a
    414 (Request-URI Too Large)

    Im stucked right now and cant find any solution.

    As I know, JSON sends data through GET method. I was wondering if I can change it to POST method. Is it possible?

    This is my code:

    Ext.util.JSONP.request({
    url: 'http://hostname.com/folder/myfile.php?action=add',
    callbackKey: 'callback',
    params: data,
    method: 'POST',
    success: function(response) {
    // do something
    },
    failure: function(response) {
    // do something

    }
    });

  2. #2
    jay@moduscreate.com's Avatar
    Join Date
    Mar 2007
    Location
    Frederick MD, NYC, DC
    Posts
    16,353
    Answers
    102
    Vote Rating
    80
    jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all jay@moduscreate.com is a name known to all

      0  

    Default


    No. JSONP uses script tags, which uses HTTP GET, which is why you have the limitation.

    You can use XHR2 (most modern browsers though).

  3. #3
    Sencha Premium Member dawesi's Avatar
    Join Date
    Mar 2007
    Location
    Melbourne, Australia (aka GMT+10)
    Posts
    1,083
    Answers
    24
    Vote Rating
    44
    dawesi has a spectacular aura about dawesi has a spectacular aura about

      0  

    Default


    use a standard cross domain form post and do some research on CORS
    Teahouse Training Company
    Official Certified Sencha Trainer

    Australia / New Zealand / Singapore / Hong Kong & APAC



    SenchaWorld.com - Sencha webinars, videos, etc
    SenchaForge.org - (coming soon)
    TeahouseHQ.com - Sencha ecosystem training portal

    Code Validation : JSLint | JSONLint | JSONPLint

  4. #4
    Sencha User
    Join Date
    Dec 2013
    Location
    Taguig City, Philippines
    Posts
    2
    Vote Rating
    0
    marc.dejoya021 is on a distinguished road

      0  

    Default


    How can I do this sir? Can you give a sample code?

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..."