<p dir="auto">Is there any reason why the <code class="notranslate">axios.defaults.adapter</code> property doesn't reflect the behaviour inside <code class="notranslate">dispatchRequest.js</code>?</p>
<p dir="auto"><a href="https://github.com/mzabriskie/axios/blob/master/lib/core/dispatchRequest.js#L40">https://github.com/mzabriskie/axios/blob/master/lib/core/dispatchRequest.js#L40</a></p>
<p dir="auto">I'm trying to build my own adapter that is capable of falling back to the default adapter under certain circumstances.  With the code as it is I'm forced to duplicate the above if-elseif, i.e.:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import axios from 'axios';
if (typeof XMLHttpRequest !== 'undefined') {
  // For browsers use XHR adapter
  axios.defaults.adapter = require('axios/lib/adapters/xhr');
} else if (typeof process !== 'undefined') {
  // For node use HTTP adapter
  axios.defaults.adapter = require('axios/lib/adapters/http');
}"><pre class="notranslate"><code class="notranslate">import axios from 'axios';
if (typeof XMLHttpRequest !== 'undefined') {
  // For browsers use XHR adapter
  axios.defaults.adapter = require('axios/lib/adapters/xhr');
} else if (typeof process !== 'undefined') {
  // For node use HTTP adapter
  axios.defaults.adapter = require('axios/lib/adapters/http');
}
</code></pre></div>
<p dir="auto">I don't know why but with the same api, sometime axios's response.data is string instead of object. See the below figure.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/7688070/44013145-f9ba29a6-9eed-11e8-8d02-c41c5f0169e9.png"><img src="https://user-images.githubusercontent.com/7688070/44013145-f9ba29a6-9eed-11e8-8d02-c41c5f0169e9.png" alt="image" style="max-width: 100%;"></a></p>
<h4 dir="auto">Context</h4>
<ul dir="auto">
<li>axios version: 0.18.0</li>
<li>Environment: React native Expo SDK 29, window 10</li>
</ul>