cosnt body = {title,content}
axios.post(uri, body, config)
axios.post(SCRAP_UTIL_LOAD_URL, {
validateStatus: (status: number) => {
return (status >= 200 && status < 300) || status == 404 || status == 409
}
})
/////////////////error
.catch((err: Error | AxiosError) {
if (axios.isAxiosError(error)) {
// Access to config, request, and response
} else {
// Just a stock error
}
})
const htmlString = fs.readFileSync(__dirname + './__test__/alpha_company.csv', 'utf8')
const axiosMock = new MockAdapter(FmpNetwork.client, {onNoMatch : 'throwException'})
axiosMock.onGet(new RegExp('/v4/shares_float/all'))
.reply(async () => {
return [200, require('../__tests__/dummy/fmp_float_all_onlyone.json')]
})