Results 1 to 3 of 3

Thread: How to send @QueryParam using Ext.Ajax.request

  1. #1
    Sencha User
    Join Date
    Nov 2016
    Posts
    3

    Default Answered: How to send @QueryParam using Ext.Ajax.request

    Hi,
    I have following problem. I have to use Ext.Ajax.request to get data from webservice. The parameter I use in backend is annotated with @QueryParam. That means that when frontend communicates with backend it uses '&query=' in request url. That worked without problem in stores. I just setted param, for example:
    Code:
    store.load(
    params: { param1: param1Value }
    )
    And store manages to send good request. But in Ext.Ajax.request, using 'params' config it does not use '&query=', therefore I get failure from backend.

    I've spent few hours now trying to force request to use '&query=', but I cant figure it out. Can anyone help?

  2. If you pass params the method defaults to 'POST'.

    Set the method to 'GET'.

  3. #2
    Sencha Premium User evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    19,256
    Answers
    759

    Default

    If you pass params the method defaults to 'POST'.

    Set the method to 'GET'.
    Twitter - @evantrimboli
    Former Sencha framework engineer, available for consulting.
    As of 2017-09-22 I am not employed by Sencha, all subsequent posts are my own and do not represent Sencha in any way.

  4. #3
    Sencha User
    Join Date
    Nov 2016
    Posts
    3

    Default

    Quote Originally Posted by evant View Post
    If you pass params the method defaults to 'POST'.

    Set the method to 'GET'.
    I did that initially, but it still didnt work. After 6 hours of using vulgar words, I've just redeployed backend on server(I tried to debug backend and IntelliJ had some problems with that, so I redeployed) and everything just works. That wasnt problem with frontend not passing parameters correctly, that was the problem with part of backend dont working at all, and not notifying me about it.

Similar Threads

  1. Replies: 2
    Last Post: 31 Aug 2014, 7:17 PM
  2. Send File with Ajax Request
    By lakmal in forum Sencha Touch 2.x: Q&A
    Replies: 1
    Last Post: 24 Oct 2012, 11:29 AM
  3. Replies: 3
    Last Post: 30 Jan 2012, 8:15 AM
  4. Problem in send ajax request :The Ext.Ajax is null or not Object
    By flyingpig in forum Ext 1.x: Help & Discussion
    Replies: 7
    Last Post: 27 Aug 2007, 11:29 PM

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
  •