missing HTTP adapter?
See original GitHub issueAxios v0.14.0 Node v6.6.0
I’m trying to do a simple GET, and I’m faced with ReferenceError: XMLHttpRequest is not defined
. I was looking through the code in dist/axios.js
, and I’m seeing something unexpected:
if (typeof config.adapter === 'function') {
// For custom adapter support
adapter = config.adapter;
} else if (typeof XMLHttpRequest !== 'undefined') {
// For browsers use XHR adapter
adapter = __webpack_require__(10);
} else if (typeof process !== 'undefined') {
// For node use HTTP adapter
adapter = __webpack_require__(10);
}
Webpack seems to be requiring the same dependency for both XHR and HTTP adapters, __webpack_require__(10)
. Further, when I search for httpAdapter
and dispatchHttpRequest
, nothing comes up.
Is the v0.14.0 release missing the HTTP adapter?
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:7 (1 by maintainers)
Top Results From Across the Web
Receiver HTTP-adapter, Content Server, missing payload
Hi Experts! We have a scenario where we transform a xml-file into html-message, and try to post it to a SAP content server,...
Read more >HTTP Adapter :: Eclipse Hono™
The HTTP protocol adapter exposes HTTP based endpoints for Eclipse Hono™'s south bound Telemetry, Event and Command & Control APIs.
Read more >HTTP Server Adapter (V5.2.6 or later) - IBM
The HTTP Server adapter processes HTTP requests from trading partners by using a perimeter server. ... No – HTTP basic authentication is not...
Read more >HTTP adapter - FAQ | NestJS - A progressive Node.js framework
HTTP adapter. Occasionally, you may want to access the underlying HTTP server, either within the Nest application context or from the outside.
Read more >Python Requests - No connection adapters - Stack Overflow
You need to include the protocol scheme: 'http://192.168.1.61:8080/api/call'. Without the http:// part, requests has no idea how to connect to the remote ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@nickuraltsev Got it. Any suggestions on how to build
axios
with both adapters included, with the goal being to bundle a single library that can run both on the web and in node?Using the
target: 'node'
with the entrynode: { process: false },
and a pluginMakes the output library both working on the web and node.