@@ -182,6 +182,7 @@ appJS.enableSubmit = function() {
182
182
*
183
183
* @param {object } args - Object where the following options are available:
184
184
* - {string} url - URL of the webservice
185
+ * - {string} method - Enforce this method, eg. `GET`, `POST`, etc. Otherwise if `params` has values it will be `POST`, otherwise `GET`
185
186
* - {object} params - Object with parameters to send to the webservice
186
187
* - {string|object} responseFormat - How to interpret the data being returned from the webservice. Available options:
187
188
* - `nothing` : don't do any postprocessing as nothing is being returned, or the returned should only be processed by post-processing function
@@ -219,7 +220,7 @@ appJS.enableSubmit = function() {
219
220
* - `data` : response from server
220
221
* - `success` : boolean true or false based on response from server
221
222
* - `doAjaxArgs` : arguments passed to the doAjax function
222
- * - {object} options - Object with nay of these options:
223
+ * - {object} options - Object with any of these options:
223
224
* - `confirmMessage` : set a string with message to have the user confirm before executing the AJAX call
224
225
* - `skipShowProcess` : set to true to not dim the page and show process status
225
226
* - `requireSsl` : set to true to require SSL for transmitting this request to the server
@@ -286,7 +287,7 @@ appJS.doAjax = function(args) {
286
287
287
288
var parms = {
288
289
url : args . url ,
289
- type : ( $ . isEmptyObject ( args . options ) ? 'GET' : 'POST' ) ,
290
+ type : ( args . method ? args . method . toUpperCase ( ) : ( $ . isEmptyObject ( args . params ) ? 'GET' : 'POST' ) ) ,
290
291
data : args . params ,
291
292
success : function ( rsp , jqXHR , textStatus ) {
292
293
var i , functionName ;
0 commit comments