Category "axios"

TypeError: (0 , _axios.default) is not a function when use jest.mock('axios') inside a *.test.js file

I try to mock axios module inside my test file like this // mycomponent.test.js import axios from 'axios'; jest.mock('axios', () => ({ get: jest.fn(() =&

how to perform operations with json string from axios?

Background I am passing variable from my frontend HTML file using axios var idToken1 = result.getIdToken(); axios({ method: 'post', url

Axios get request not performing correctly after useEffect cleanup

I am writing an axios get call useEffect that is called whenever a user selects an option from a dropdown menu. It works on getting info on the first time I sel

React native network error (CORS) when using Chrome developer tools but working with react-native-debugger

All requests seem to work when using react native debugger but when attempting to use chrome debugger at http://localhost:8081/debugger-ui/ I get: Access to XML

URLSearchParams with axios instance in react-native

I was attempting to send payload, and URLSearchParams through an API URL from my react-native application. I initialized an axios instance as, import { BASE_URL

upload image from react native app to symfony backend via axios

I want to upload an image from react native app to backend in symfony via axios. here is the code of the front end : const [pickedImage, setPickedImage] = u

Nodejs - Axios - Timeouts lead to memory leak

I'm running an app which basically: Receives a request through Express.js Send multiples requests to various endpoints Once those endpoints responses, we comput

NextJS - getServerSideProps - Error 400 - Bad Request

I'm getting a problem using fetch within the NEXT JS with the getServerSideProps function. As I'm starting with this framework, I'm probably not doing it well.

Vue JS returns [__ob__: Observer] data instead of my array of objects

I've created a page where I want to get all my data from the database with an API call, but I'm kinda new to VueJS and Javascript aswell and I don't know where

Configuring Axios for django-vuejs-nginx-docker

I'm using the stack described in the title and everything is fine in my dev environment so far. I used to have Docker containers both for my backend and my fron

How Do I Use Axios to Post Form Data?

I am working on a project with a springboot backend and Vue frontend. Right now I am able to GET a list of products from my DB. I can GET the list and display i

Axios - cross domain cookies

I have two applications (backend and frontend) running on local computer (frontend - Vue app on port 8080, backend - Scala app on port 9000) I'm trying to send

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