We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
empty param creating instance in axios
const client = axios.create()
gives error
Could not get default transformRequest function from Axios defaults
below code works perfectly when passing tranform
try { const aws4Interceptor = require("aws4-axios").aws4Interceptor const client = axios.create({ transformRequest: (data, headers) => { // delete headers.common["Authorization"] // console.log(data) // console.log(headers) return data }, }) const interceptor = aws4Interceptor( { region: "us-east-1", service: "ivs", }, { accessKeyId: AWS_KEY, secretAccessKey: AWS_SECRET, } ) client.interceptors.request.use(interceptor) const currentChannelData = JSON.stringify({ channelArn: CURRENT_CHANNEL, }) const {data, status} = await client.post( `${AWS_URL}/GetStream`, currentChannelData ) if (status === 200) { console.log(data) return data.stream.viewerCount } throw new Error("Some problem in getWatchingStreamCount.") } catch (err) { if (err.response && err.response.data) { console.log(err.response.data) } console.log("getWatchingStreamCount error ", err.message) return 0 } `
The text was updated successfully, but these errors were encountered:
I hope its not axios issue
Sorry, something went wrong.
No branches or pull requests
empty param creating instance in axios
gives error
below code works perfectly when passing tranform
The text was updated successfully, but these errors were encountered: