Category "axios"

State Not Updating when Consuming React Custom Hook that Uses Axios with useReducer to Get Async Data

My app returns a "null is not an object" Render Error when consuming the useFetch custom hook that I made to get async data using axios. The status, error, and

Stripe parameter_invalid_integer

I am trying to setup PaymentIntents API from Stripe and the amount needed to be passed to the API is very confusing. Stripe Docs: All API requests expect amount

Passport.js isAuthenticated() always returns false when on heroku, but works properly when server is run locally

I am using passport.js for authentication as well as express-sessions to store cookies on the client. Additionally, my client is a react app. I still am not sur

How to migrate from request to axios

I am using [https://github.com/huobiapi/REST-Node.js-demo][1] for my connection to huobi cryptocoin exchange but i am having some errors like : (node:29550) Wa

I get CORS error when I try to access metadata stored on IPFS

I am trying to fetch the metadata I stored on NFT.storage using axios, but each time I get this error: Access to XMLHttpRequest at 'ipfs://bafyreib6hf354pwtnwx

ERROR in ./node_modules/axios/lib/adapters/http.js

I get this error after installing and importing axios in my react project, any help?: Compiled with problems: ERROR in ./node_modules/axios/lib/adapters/http.js

React and TypeScript—which types for an Axios response?

I am trying to present a simple user list from an API which returns this: [{"UserID":2,"FirstName":"User2"},{"UserID":1,"FirstName":"User1"}] I do not understa

Cors issue i also set the proxy in pkg.json due to cors and set the api according to it but this error is not remove

GET http://localhost:3000/api/fetch?search=12312321 404 (Not Found) cors issue in Reactjs and node js i use the proxy method in Reactjs but can't get rid

How to Check if Axios Call Fails due to No Internet Connection?

I'm trying to figure out an accurate way to detect axios call failure due to no internet connection. Does axios call failure return a specific response object

Authenticate my ReactJS SPA with laravel/sanctum using Axios

After a successful authentication (login + token), I'm still unable to request auth:sanctum routes and I get the following response: Docs ... This token shoul

cookie not set in the axios request header

I am having sprin boot application as my back end and vue js in the front end Both are running in my localhost but with different ports I am using axios to make

How to use react-toastify promise in axios

// how can I use the promise of toastify like I want to show spinner while fetching data then message success or failed // but I am getting error in bellow code

Axios: chaining multiple API requests

I need to chain a few API requests from the Google Maps API, and I'm trying to do it with Axios. Here is the first request, which is in componentWillMount() a

Sending the bearer token with axios

In my react app i am using axios to perform the REST api requests. But it's unable to send the Authorization header with the request. Here is my code: tokenP

Pokemon API request generate 5 Pokémon at a time

I need help with how to fetch 5 random pokemon at a time instead of rendering all pokemon on the screen using react? // destructuring const [items, setItems] =

React: How optimize a custom hook that shares data?

I have a Custom Hook similarly with the below: import { useEffect, useState } from 'react'; import axios from 'axios'; const myCustomHook = () => { cons

How to catch and handle error response 422 with Redux/Axios?

I have an action making a POST request to the server in order to update a user's password, but I'm unable to handle the error in the chained catch block. retur

Axios is not being able to add/update header in the request interceptor

In the main.js of my Vue based SPA, I have the following snippet: let token = localStorage.getItem('token'); if (token) { Vue.prototype.$http.defaults.headers

Zip File Download via Axios from Express Server not working in React App

I have implemented a backend where administrators can create backups. These backups are collected in zip files and are stored in a non-public folder on the serv

Can't post videos to Tiktok using the Web Video Kit API

I am trying to upload a video to Tiktok using this endpoint: https://open-api.tiktok.com/share/video/upload/ Following the official docs: https://developers.tik