I have a CSV file from an external host.
I'd like to retrieve the content of the CSV file and read it in my VUE JS component.
For example,
CSV location: https://my-host.com/file-name.csv
let host = 'https://host-name.com/';
let filePath = 'file-name.csv';
try {
let response = await axios.get(`${host}${filePath}`, {}, {});
this.csv = response.data;
} catch (err) {
console.log(err);
}
I get the following error: net::ERR_CONNECTION_TIMED_OUT:
Error: Network Error
at createError (createError.js:16)
at XMLHttpRequest.handleError (xhr.js:69)
I've tried to configure axios with:
axios.defaults.timeout = 500000;
Any other suggestions?
Thanks.