Results 1 to 2 of 2

Thread: Why does Connect.setOptions() not allow parameters for method === 'DELETE' ?

  1. #1
    Sencha Premium Member
    Join Date
    Jul 2012
    Posts
    64
    Answers
    2

    Default Why does Connect.setOptions() not allow parameters for method === 'DELETE' ?

    So, spent some time trying to make a very specific API/REST call using Extjs 4.1 today. This particular server side call require parameters be passed with DELETE.

    Discovered that Ext.data.Connect.setOptions() only appends parameters to the url IF the following is true:

    from: extjs-4.1.1\src\data\Connection.js, starting on line 546:

    Code:
    if ((method == 'GET' || data) && params) {
        url = Ext.urlAppend(url, params);
        params = null;
    }
    I recognize there are allot of way's to read the RESTfulness (or lack thereof) about parameter passing to methods such as DELETE. But the RFC's are silent on parameters for methods such as DELETE, HEAD, OPTIONS, TRACE, etc.... So I'm not sure why the code does not read more like:

    Code:
    if (params) {
        url = Ext.urlAppend(url, params);
        params = null;
    }
    Inquiring minds would like to know.

    NOTE: I'm not looking to ask 'how do I pass parameters' to DELETE. I recognize one could just hand write the url and manually append the parameters. This is more of a 'getting into the mindset of Sencha developers' question.

  2. #2
    Sencha User metalinspired's Avatar
    Join Date
    Apr 2012
    Posts
    98
    Answers
    4

    Default

    Here's another question.
    Why is Connection.js using Ext.urlAppend() when documentation says it's DEPRECATED?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •