Results 1 to 2 of 2

Thread: [FIXED][3.1] Restful Store incorrectly overrides proxy configured HTTP method

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1

    Default [FIXED][3.1] Restful Store incorrectly overrides proxy configured HTTP method

    Using a JsonStore (restful enabled), for created HttpProxy, the configuration for HTTP method to use (api configuration) is wrongly overriden in constructor.

    if((this.url || this.api) && !this.proxy){
                this.proxy = new{url: this.url, api: this.api});
            if (this.restful === true && this.proxy) {
                this.batch = false;
      ; //Sets HTTP method to CRUD defaults
    I am aware a strict CRUD backend should use methods as POST/GET/PUT/DELETE, but the proxy API for HttpProxy indicates this should be possible to modify even for restful, and confusing impl today.

    For reference, my implementation:

     var giftsStore = new{
                            proxy: new{
                                api: {
                                    create: {
                                                    url: '/api/gifts',
                                                    method: 'POST'
                                                destroy: {
                                                    url: '/api/gifts',
                                                    method: 'DELETE'
                                                read: {
                                                    url: '/api/gifts/',
                                                    method: 'GET'
                                                update: {
                                                    url: '/api/gifts',
                                                    method: 'POST'
                            //data: successJsonData, //test data
                            restful: true,
                            autoDestroy: true,
                            autoLoad: true,
                            autoSave: true,
                            writer: new{
                                encode: true,
                                writeAllFields: false // write all fields, not just those that changed
                            //reader configs
                            root: 'items',
                            idProperty: 'key',
                            fields: [
                                {name: 'reserved', type: 'boolean'},
                                {name: 'reserved_by_user', type: 'boolean'},
                                      exception: function(a, b, c, d, e, f)
                                      load: function()
                                      beforeload: function(a, b)
    As a result, update requests will still use default PUT method.
    Running ext 3.1.0, and with current implementation of, update will always run with PUT method.

  2. #2
    Sencha User hendricd's Avatar
    Join Date
    Aug 2007
    Long Island, NY USA


    Fixed in SVN.
    "be dom-ready..."
    Doug Hendricks

    Maintaining ux: ManagedIFrame, MIF2 (FAQ, Wiki), ux.Media/Flash, AudioEvents, ux.Chart[Fusion,OFC,amChart], ext-basex.js/$JIT, Documentation Site.

    Got Sencha licensing questions? Find out more here.

Posting Permissions

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