- /*
- // If only a single argument was passed in,
- // assume that it is a object of key/value pairs
- if ( !url ) {
- ret = type.complete;
- var success = type.success;
- var error = type.error;
- var dataType = type.dataType;
- var global = typeof type.global == "boolean" ? type.global : true;
- var timeout = typeof type.timeout == "number" ? type.timeout : jQuery.timeout;
- ifModified = type.ifModified || false;
- data = type.data;
- url = type.url;
- type = type.type;
+ // if data available
+ if ( s.data ) {
+ // convert data if not already a string
+ if (typeof s.data != 'string')
+ s.data = jQuery.param(s.data)
+ // append data to url for get requests
+ if( s.type.toLowerCase() == "get" )
+ // "?" + data or "&" + data (in case there are already params)
+ s.url += ((s.url.indexOf("?") > -1) ? "&" : "?") + s.data;