I could use axios in the browser with Cocos Creator.
But in android build I got an error.
ERROR: Uncaught TypeError: Cannot read property 'charAt' of undefined, location: assets/main/index.c8cc9.js:0:0
Made this change.
pathname: (urlParsingNode.pathname.charAt(0) === '/') ?
urlParsingNode.pathname :
'/' + urlParsingNode.pathname
↓
pathname:urlParsingNode.pathname
However, no response is returned.
Only Mock returns a response.
Need to change axios source code?
you can try add this code block