support icon indicating copy to clipboard operation
support copied to clipboard

Should support passing body to `load` Project config

Open matsbryntse opened this issue 2 years ago • 0 comments

  • [x] Add body param
  • [ ] Warn if params used with GET/HEAD leading to too long URL
  • [x] Tests / Docs

Should merge with our current params, currently it's overwritten.

Forum post

Hi, I need to pass a json payload to the transport load. The example below will pass the foo as part of the querystring. I cannot pass the json through querystring because sometimes it can become large.

load : {
        url       : 'http://mycool-server.com/load.php',
        // HTTP request parameter used to pass serialized "load"-requests
        paramName : 'data',
        // pass extra HTTP request parameter
        params    : {
            foo : [{data: 'data1'},{data:'data2'}]
        }
    },

In Jquery, something like this.

$.service('url', {
         model: [{data: 'data1'},{data:'data2'}],
         returnType: 'text'
      }).done(function (response) {
         
 });

matsbryntse avatar Sep 30 '22 09:09 matsbryntse