(options)
| 75 | }); |
| 76 | }; |
| 77 | var serializeData = function(options) { |
| 78 | if(options.processData && options.data && typeof options.data !== "string") { |
| 79 | var contentType = options.contentType; |
| 80 | if(!contentType && options.headers) { |
| 81 | contentType = options.headers['Content-Type']; |
| 82 | } |
| 83 | if(contentType && ~contentType.indexOf(jsonType)) { //application/json |
| 84 | options.data = JSON.stringify(options.data); |
| 85 | } else { |
| 86 | options.data = $.param(options.data, options.traditional); |
| 87 | } |
| 88 | } |
| 89 | if(options.data && (!options.type || options.type.toUpperCase() === 'GET')) { |
| 90 | options.url = appendQuery(options.url, options.data); |
| 91 | options.data = undefined; |
| 92 | } |
| 93 | }; |
| 94 | var appendQuery = function(url, query) { |
| 95 | if(query === '') { |
| 96 | return url; |
no test coverage detected