Questions tagged [axios]

Axios is a Promise-based HTTP client for JavaScript which can be used in your front-end application and in your Node.js backend.

Filter by
Sorted by
Tagged with
1 vote
1 answer
11 views

Axios Get is returning an empty array in my React Component

Here is my Component where I am need to load data from the backend. import { Card, CardBody, CardFooter, Flex, Image, Spacer, } from "@chakra-ui/react"; import CardIcon from &...
user07773's user avatar
0 votes
0 answers
20 views

Refactoring the code. This is a challenge for me [closed]

// How many ways can you think of to improve the execution time of this function? // How many security exploits and worst practices can you find in this code? // Are there ways to make this code ...
Saddam Hussain's user avatar
0 votes
0 answers
3 views

How to set SSL options on my React app utilizing Axios

I've been having issues with my MERN-stack blogging app When using my live server, I can log in, register a new user and create/delete likes on the blogs and comments. My issues arise when I try to ...
O Sharpe's user avatar
0 votes
0 answers
12 views

How to persist the MUI Transfer List data

I am using the Transfer List as a reusable component that receives two arrays, that are filled with api data. Today, the lists are filled like this.: useEffect(() => { setLeft( JSON....
Emanuella Gomes's user avatar
0 votes
0 answers
27 views

Getting Error: index.ejs while compiling ejs

Basically, I'm creating an express server using this public API: https://bored-api.appbrewery.com/random to make a request from it that every time when a user set the 2 dropdowns and click on the ...
Yuval Yanay's user avatar
0 votes
0 answers
16 views

Axios get request using React useState to store data - data is null

When I make an API request and then attempt to set the state to the results from the Axios request (after formatting the data a bit) it doesn't work. The request is fine and I'm able to store the data ...
Camila Daniels's user avatar
0 votes
0 answers
13 views

React Native - security issue sensitive information in memory dump

I am facing some security issues on my React Native App, specifically for Android. I am using Fridump to run some penetration testings and see what is on memory. https://frida.re/docs/android/ https://...
Franklin Velásquez's user avatar
0 votes
0 answers
32 views

Error handling with Transfer-Encoding chunked http requests with express and axios

Im trying to fetch a big amount of data from a db in JS using streaming to prevent loading all the data into memory at once. Im using express as my server and a nodeJS client that fetches the data ...
Roe's user avatar
  • 61
0 votes
0 answers
17 views

JWT malformed: stored my jwt token in cookies

so i am trying to run an api route on the frontend of my application but each time i do i get a jwt malformed response even though the token is been passed to the client side as cookies i don't seem ...
Juju's user avatar
  • 1
0 votes
0 answers
25 views

422 (Unprocessable Entity) When using axios to send file to fastapi

handle submit function: const handleSubmit = async (acceptedFiles) => { const formData = new FormData(); formData.append("file", file); try { const response = await ...
Parasite -'s user avatar
0 votes
0 answers
16 views

PUT request gives "Request failed with status code 404" error message in nodejs, axios

MAJOR UPDATE: THAT BOOTCAMP'S API IS BROKEN. ERROR ISN'T FROM MY SIDE What problem I had had: Actual Problem: I'm working on server side using axios, nodejs, following Angela-Yu's Webdev Bootcamp. ...
Anu's user avatar
  • 1
0 votes
1 answer
23 views

Property 'get' does not exist on type '() => AxiosCacheInstance'

New to typescript/react and looking for help with specifically this error and in general anything else that isn't right. I have an axios api client called api-client.ts //import axios, {CanceledError} ...
Chris Fink's user avatar
0 votes
0 answers
10 views

Type 'AxiosStatic' is missing the following properties from type 'AxiosStatic': cancel, cancelAll

http.ts file is as follows // using axios as current Http library import axios from 'axios'; import axiosCancel from 'axios-cancel'; // add `cancel` prototype method to abort `XHR` requests and ...
wasim963's user avatar
-2 votes
0 answers
24 views

Is there a way to get the list of pokemon from a specific generation from the pokeAPI using React and Axios? [closed]

I was just wondering if there was any way to filter Pokemon by a specific generation from the pokeAPI. I tried looking for properties in the generations endpoint that would give me the list of Pokemon ...
Hussein Khodor's user avatar
0 votes
1 answer
21 views

Unexpected return - {"_A": null, "_x": 0, "_y": 0, "_z": null} - Stripe Request

I am passing this function for the request: useEffect(() => { const fetchPaymentSheetParams = async () => { try { const response = await axios.post(${API_BASE_URL}/payment-sheet, { ...
Henrique Nascimento's user avatar
0 votes
0 answers
14 views

How to get Data based on ID in Firebase Realtime Database

I am trying to fetch data from firebase realtime database based on ID. { "users" : [ { "id": 1, "title": "Short Term Tourist Visa", "...
Firoz Khan's user avatar
-1 votes
0 answers
18 views

wanted to retreive data by the param district but array received is empty but when i am receiving all data from database it is coming fine

codeSandbox code https://codesandbox.io/s/blue-bush-lrnhpk?file=/src/components/CommonDashBoard.jsx/////////// import React, { useEffect } from 'react' import { retreiveAll, retreiveProductByCategory }...
Aryan's user avatar
  • 1
1 vote
0 answers
13 views

Request interception with nightwatch/axios

I want to intercept a request and then get some values from it and store into my variables I did it with cypress and I want it to be like this cy.intercept('*', (req) => { req.headers['...
Stepash's user avatar
  • 23
-1 votes
1 answer
20 views

API Domain | How to get domain in hubspot, then pass it to api calls before axios calls

I want to get the domain name after axios calls are made. Because the axios calls need the domain URL to make them work. The API call is static I tried to place my domain URL and the calls works fine. ...
Neil Junsan's user avatar
0 votes
0 answers
23 views

Cant get right variable from API using AXIOS

Im currently trying to get random meal name through https://www.themealdb.com/api.php API, but it seems Im doing something wrong. I will be happy for any help! This is my code from .js file: import ...
Tomas Nguyen's user avatar
0 votes
1 answer
21 views

Getting axioserror network error at xmlhttprequest.handleerror when calling axios post request in react

I am new to this React.js axios concept and when I try to call axios.get, I get AxiosError: Network Error I'm not sure why this error is coming and I have read this and this some other examples also ...
ashok's user avatar
  • 311
0 votes
2 answers
43 views

Backend and frontend won't communicate after deployment on VPS nginx server

I'm deploying my first Node.js / React / MySQL app. I decided to deploy it on a VPS server from Hostinger (first time I'm using a VPS). I followed some tutorials to set up the server with Nginx. I ...
Lazare Boddaert's user avatar
0 votes
0 answers
21 views

Getting uncaught runntime Error in React Query V4

My component is something like this: function BookingContainer() { const { bookingId } = useParams() as { bookingId: string }; const { supplierId } = useParams() as { supplierId: string }; const { ...
Anik Saha's user avatar
  • 4,323
0 votes
0 answers
28 views

How to Configure Axios Proxy Settings for Windows URL?

I have a URL that requires enabling a proxy in the Windows settings (as shown in the picture), and it works. The way I invoke this URL is as follows: const response = await axios.get('https://example....
Jon's user avatar
  • 105
1 vote
2 answers
41 views

after updating data in react context, how to re-render components under that context

My react application has several components whose UI will show up if the user is logged in or not. To share that state across my entire application, I made a context file called AuthProvider: import ...
Moon's user avatar
  • 277
-1 votes
1 answer
32 views

How to write axios with bearer token? [closed]

I send a patch task from Axios under React and put the access token, the function verifies me correctly but it no longer calls the function callback: addComment function in client side: const ...
user22399441's user avatar
1 vote
0 answers
35 views

Metro Cannot resolve url issue in Nx mono repo with expo app

I am getting an error from metro when trying to wrap my application in an AxiosProvider from a custom context. I really don't know why, because I kept the default Nx configuration but I have a weird ...
brpinto's user avatar
  • 35
0 votes
0 answers
36 views

Failed to load resource: the server responded with a status of 404 () why?

I am building an app in which the user can input cars into the API app and delete them, but I am getting a 404 error when trying to delete a car. what I don't understand is that I can access the car ...
Artur Gouveia's user avatar
1 vote
0 answers
40 views

FastAPI response video to Axios

Hi I want to make noise reduction from video. I post video from client-side React with axios, I processed video data. But I couldn't send back to client with FastApi. I used FileResponse, data is ...
İlker Galip ATAK's user avatar
-1 votes
0 answers
14 views

Access to XMLHttpRequest [duplicate]

I tried to fetch a football data from an api. But i am getting blocked by CORS policy This is want i get from the console: Access to XMLHttpRequest at 'https://api.football-data.org/v4/competitions/...
Jafar Li-hammed's user avatar
0 votes
0 answers
35 views

CORS error Access-Control-Allow-Origin' / wildcard "*" / withCredentials: true , Next 13.5/ axios / Laravel 10

Something strange for me error wise. Frontend : Next 13.5 Backend : Laravel 10 Domain is registered on Cloudflare / frontend on Vercel backend standard cPanel I got this error `Access to ...
SinishaS's user avatar
0 votes
1 answer
29 views

Displaying an image in ReactJS from an API

I am getting an image from my API using the Axios library. I can see the image in Postman and in the Network tab on the browser, so I know the API is sending it and Axios gets it. But I dont know how ...
CodePirate's user avatar
-2 votes
0 answers
26 views

API Calls to a URL and URL with a endpoint Using React to Backend Servers [closed]

I have an application with the url :- https://payroll.test.com/ which when invoked makes an API call ("CheckELigibility") and then it displays 3 tiles (Tile1, Tile2, Tile3). On clicking on ...
Saksham Agarwal's user avatar
0 votes
0 answers
30 views

I need help I am trying to update the user profile React & Laravel

So I am trying to update user profile but the backend tells me the data is unprocessable. This happens because in the headers I used the content type multipart/form-data. I did this nbecause I need to ...
El Gueddari Ayoub's user avatar
-3 votes
0 answers
29 views

Is there any standard for URL's query of HTTP request? [closed]

http://localhost:8080/q?name= http://localhost:8080/q?name http://localhost:8080/q? The name here will be different in different situations. **For Frontend: ** if query(maybe params) is null {name: ...
AuroraTea's user avatar
0 votes
0 answers
43 views

Shopware 6 Plugin: Why do I need to click the save button twice to create a new entry?

I'm working on a Shopware 6 Plugin, and I'm facing an issue with the save functionality. Specifically, when I click the save button, it requires me to click it twice in order to create a new entry in ...
mlodhi's user avatar
  • 438
0 votes
1 answer
26 views

How to pass foreign key model instance from django to reactjs using axios

I have the address model which is basically foreign key aggregation to different other models. And user Model that has an address ID. every user has an address. and every address is combination of ...
Mr.Trent's user avatar
0 votes
0 answers
16 views

Get data with React Redux Call Axios many time but can not render data till I refresh it

I am create website with React Redux using axios to get data API, but when I want to render it to my page, it can not read till I refresh the page by hot reload or saving project again. Here is my ...
ThienBao's user avatar
0 votes
1 answer
41 views

onCall vs on onRequest expected behavior?

I've been working on an app for a good while and now I've started working on an api gateway in firebase. I'm using axios to download data which works fine in onRequest but if I do the same in onCall ...
Oscar Berggren's user avatar
0 votes
1 answer
33 views

AxiosError: Network Error in React Native and Django

I am new in Django and React Native. Im using Django rest framework to connect my front end to backend. and I am using "axios" in sending request to django I am trying send URL in django. ...
Julius Novachrono's user avatar
0 votes
0 answers
25 views

I'm making requests via the terminal to an API, and I want to render the responses on the frontend to interact with them However I'm facing this error

I am a beginner programmer, and I have worked with APIs before. However, this is the first time I have encountered this error. Previously, when I tried to render directly in the browser, I faced CORS ...
Vitor Goto's user avatar
0 votes
1 answer
49 views

CORS error - I have set the headers but I keep getting the same error

I have an API in Node.js - TypeScript using cors: import cors from 'cors'; const options: cors.CorsOptions = { origin: 'http://localhost:3000', methods: 'GET,HEAD,OPTIONS,PUT,PATCH,POST,DELETE', ...
johnjoao_'s user avatar
0 votes
0 answers
33 views

Cannot POST object from React to Spring Boot [duplicate]

I cannot POST an object from my React frontend to Spring Boot. I'm receiving this error Cannot deserialize value of type java.lang.String from Object value (token JsonToken.START_OBJECT)] This is the ...
JohnnySmith88's user avatar
0 votes
0 answers
17 views

When sending a protobuf payload it's sending fully encoded NULL trailing values

when sending a protobuf protobufjs request using axios in vue3 js, it seems to be filling the buffer with trailing NULL values, causing my backend to fail the decode cannot parse invalid wire-format ...
i773's user avatar
  • 75
0 votes
0 answers
20 views

Error while uploading image to server using form data in react-native

Images are uploading using postman but it is giving error in React Native import React, { useState } from "react"; import { Button, Image, TextInput, View, Alert } from "react-native&...
Harshhhh......'s user avatar
0 votes
0 answers
23 views

Axios POST Request using JWT in Vue3 and Django

Alright so as the title says I have a working Django application where my API creates a JWT key and saves it to my cookies. Now my frontend which is in Vue is supposed to send a form to the backend ...
Marvellous's user avatar
0 votes
0 answers
12 views

I tried downloading a file using its mime type in react js but when the pdf gets downloaded it has no content just the correct no. of pages

This is the function to download it getting the mime type along with other values from the api call for each document in the parent element const downloadDocument = (handleString, mimeType, ...
Sukhjinder Soni's user avatar
-4 votes
0 answers
31 views

1 API Call, producing 2 different results with different array lengths. Why?

const fetchCurrentWeather = useCallback( async (geoData, units = weather.units) => { const lat = geoData.latitude; const long = geoData.longitude; const timezone = geoData....
Keith Camilleri's user avatar
0 votes
0 answers
19 views

Toastify-js library for login attempts [closed]

I need to show a toast notification for a user's sucessful and unsuccessful login attempts using the toastify-js library. There is existing functionality in a file that handles authentication HTTP ...
george's user avatar
  • 1
0 votes
0 answers
15 views

403 with axios but 200 with python.requests

I have an apigateway that uses IAM as the authorization type. If I use aws_requests_auth (python) I get a 200, but when I use axios I get a 403. Completely ran out of ideas at this point. I'm rabbit-...
caverac's user avatar
  • 1,515

1
2 3 4 5
487