Projekt

Allgemein

Profil

GX-Task #47974 » HTTPOverridePatch.patch

Till Tepelmann, 15.08.2016 18:32

Unterschiede anzeigen:

src/StyleEdit3/javascript/libs/Ajax.js (revision )
103 103
 * @return {jqXHR}
104 104
 */
105 105
exports.put = function(url, data, options) {
106
	return _request('PUT', url, data, options);
106

  
107
	var finalOptions = $.extend(true, {}, options, {
108
		headers: {
109
			'X-HTTP-Method-Override': 'PUT'
110
		}
111
	});
112

  
113
	return _request('POST', url, data, finalOptions);
107 114
};
108 115

  
109 116
/**
......
116 123
 * @return {jqXHR}
117 124
 */
118 125
exports.delete = function(url, data, options) {
119
	return _request('DELETE', url, data, options);
126

  
127
	var finalOptions = $.extend(true, {}, options, {
128
		headers: {
129
			'X-HTTP-Method-Override': 'DELETE'
130
		}
131
	});
132

  
133
	return _request('POST', url, data, finalOptions);
120 134
};
121 135

  
122 136
/**
......
129 143
 * @return {jqXHR}
130 144
 */
131 145
exports.patch = function(url, data, options) {
132
	return _request('PATCH', url, data, options);
146

  
147
	var finalOptions = $.extend(true, {}, options, {
148
		headers: {
149
			'X-HTTP-Method-Override': 'PATCH'
150
		}
151
	});
152

  
153
	return _request('POST', url, data, finalOptions);
133 154
};
    (1-1/1)