(isForm)
| 255 | |
| 256 | utils.forEach(['post', 'put', 'patch', 'query'], function forEachMethodWithData(method) { |
| 257 | function generateHTTPMethod(isForm) { |
| 258 | return function httpMethod(url, data, config) { |
| 259 | return this.request( |
| 260 | mergeConfig(config || {}, { |
| 261 | method, |
| 262 | headers: isForm |
| 263 | ? { |
| 264 | 'Content-Type': 'multipart/form-data', |
| 265 | } |
| 266 | : {}, |
| 267 | url, |
| 268 | data, |
| 269 | }) |
| 270 | ); |
| 271 | }; |
| 272 | } |
| 273 | |
| 274 | Axios.prototype[method] = generateHTTPMethod(); |
| 275 |
no test coverage detected