2
0
mirror of https://github.com/tenrok/axios.git synced 2026-06-08 17:22:34 +03:00

import isURLSameOrigin at top

This commit is contained in:
Vineet Hawal
2015-11-22 01:27:34 +05:30
parent 0be4467e05
commit 5c3b144a64
+1 -2
View File
@@ -42,7 +42,7 @@ module.exports = function xhrAdapter(resolve, reject, config) {
// Create the request
var request = new adapter('Microsoft.XMLHTTP');
request.open(config.method.toUpperCase(), buildURL(config.url, config.params, config.paramsSerializer), true);
console.log(request);
// Set the request timeout in MS
request.timeout = config.timeout;
@@ -78,7 +78,6 @@ module.exports = function xhrAdapter(resolve, reject, config) {
// Specifically not if we're in a web worker, or react-native.
if (utils.isStandardBrowserEnv()) {
var cookies = require('./../helpers/cookies');
var isURLSameOrigin = require('./../helpers/isURLSameOrigin');
// Add xsrf header
var xsrfValue = isURLSameOrigin(config.url) ?