Most voted "axios" questions
AXIOS is a library used for AJAX requests based on files. Use this tag when the problem refers to library usage.
Learn more…196 questions
Sort by count of
-
0
votes1
answer35
viewsCreate a table separating dates by quarter with React and Node
The table needs to look like this: She’s like this: I was able to create a table using Sequelize with the data of each unit, with cnpj and everything, and I made a table of dates related to this…
-
0
votes1
answer32
viewsPass an array to a webapi controller
I’m having trouble passing an array to a controller via Axios. Example of the WEBAPI Controller code: [HttpGet] [ActionName("openshape")] [Route("api/shape/openshape")] public…
-
0
votes0
answers46
viewsHow can I simplify HTTP requests in React?
I am currently working on a project that has modules with multiple API requests. Similarly, cases of "ordered" requests are frequent, that is, they are carried out as long as a given condition is…
-
0
votes0
answers37
viewsBackend not receiving body of the request via AXIOS or Fetch
I’m trying to make a POST request via fetch and via Xios, but something is happening that the request arrives without the body. I used Postman to see if it could be some problem in the backend,…
-
0
votes0
answers47
viewsHow to resolve Cors error in Node
I did my backend with Node/express normally and tested all routes in India and everything took place normally at the front(vuejs) made requests via Xios, all routes also worked, except the…
-
0
votes1
answer57
viewsError: Undefined Binding(s) when I’m going to give a
I’m trying to make a login system , I wrote the code and when I do it works perfectly , but when I made the connection to the front end using Axios it can’t send the typed data to the database. I…
-
0
votes0
answers47
viewsI cannot return the response of a post request with Xios from a function passed to child component
I’m using the Google Translation Api, basically the function makes a request for their Api sending as parameters "q" (the text that needs to be translated) and "target" (a string containing the iso…
-
0
votes0
answers27
viewsAxios can’t get data from my PHP server
I’m trying to make the connection between my php server and Axios . I had already used Axios but with Node.js. I’m trying to get him to pull the database data and print it on the screen, but when I…
-
0
votes0
answers97
viewsFiltering Results before rendering, with value returned from an api as a filter parameter
I have a form, which has two related fields, a group and a subgroup, so when I upload the data from the api to popular the screen, I get all the groups and all the subgroups, stored in a state and…
-
0
votes0
answers42
viewsDoubt about how "import" works
I am learning JS and Reactnative and for that I am studying about the creation of a backend in Node.js and a frontend in React Native and one thing caught my attention. In my backend when the user…
-
0
votes0
answers26
viewsHow to get something in the api header?
Guys as they are? I have a little problem to get the header of a request via fetch or Next... using insomnia the header appears However when I make a request via Xios or fetch it does not return…
-
0
votes0
answers20
viewsAxios doing two post with only one request
Good afternoon! How are you? I am trying to register a user and his restaurant. So I first post the user data and on . then send me to the restaurant registration route. It makes the user’s…
-
-1
votes2
answers400
viewsJWT TOKEN authentication is not persisting
Well, every time I Reload in my application or open and close it, I have to put the login and password, it could be some error in my code, could someone take a look? 'Cause I need when I open do…
-
-1
votes1
answer67
viewsHow to get the value of this Array in php?
I’m doing an Axios.post and sending an object with JSON.stringfy() In my php file I gave var_dump in the reply and $POST returns an array like this: array(1) '…
-
-1
votes1
answer69
viewsDoes Axios use AJAX by default?
Person, a question when studying Xios came up. When I use the default http call with Xios.get(url). then(), is this already considered as an AJAX call? Or is it necessary to add something else?…
-
-1
votes1
answer215
viewsProblem with routes in the Axios + Aravel
I’m using vue.js with axios to make Cruds but I have a question about routes. I have the following routes: | DELETE | admin/deleteprod/{id} | componet_3.produtos |…
-
-1
votes1
answer474
viewsProblem with Cors Laravel project 5.5 and Vuejs
In an Laravel project using the features of an API I have some logos and I have my endpoints in the Laravel.php api file <?php Route::post("auth", "Auth\AuthController@authenticate");…
-
-1
votes2
answers168
viewsReact Native: Component does not find state data after setState
I’ve had this problem for weeks: I am using React Hooks to request an internal api using useEffect to make a request and then store the result within a setState. If I give a console.log the first…
-
-1
votes1
answer112
viewsproblems with Axios and React-Native. Axios returning empty attributes
All right? I am developing an application for a client in React-On, due to some integrations that the app needs to have I developed his backend using Laravel 6.x. So far so good, I’ve done all the…
-
-1
votes1
answer129
viewsDoes Axios take long to consume the API?
Hey, guys! All right? I am starting my studies in Vanilla Javascript to study future frameworks using js. I made a small web project in which the user type the ZIP code of the residence and the…
-
-1
votes1
answer320
viewsHow can I check the status value on a request using Xios?
index.html <!DOCTYPE html> <html lang="pt-BR"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link…
-
-1
votes1
answer107
viewsHow to catch a child object using Axios?
I’m making a website using React. When I run the GET method, I get the following result On the front, the code is like this: import React from 'react' import axios from 'axios' export default class…
-
-1
votes1
answer2457
viewsBlocked cross-origin request - JS/CORS/AXIOS
I am using an API (Axios) to connect my application backend to frontend, however, I am not able to give POST (register a new record) on one of the pages because Mozilla Firefox blocks cross-origin…
-
-1
votes1
answer1981
viewsProblem with CORS - Preflight (get works, post does not)
Does anyone know how I can solve this CORS problem? Because honestly I tried a lot and I could not, I already put in the backend (php) ACCESS-CONTROL-ALLOW-ORIGIN * and others, even so the error…
-
-1
votes2
answers199
viewsHow to request and update a status before render
I’m making an application and was creating a Privaterouter. Since I am using a Fake API (hai-server) it generates me a token on login and I can block calls from some routes if I do not pass this…
-
-1
votes1
answer286
viewsView data from React Native API
Hi Dev’s I’m new in RN, I’m trying to show the return of a json, but I can’t access by the handle on the screen, only in the console. export default Function Functional() { const [date, setData] =…
-
-1
votes1
answer753
viewsTake data from an React Native array
I need to get data from a array of the server to display to the user. A is a show as if it were a feed of a social network, but is showing the same contents over and over again. componentDidMount =…
-
-1
votes1
answer198
viewsAxios does not pass data to API Asp. Net Core
I searched every corner of the network for an answer and couldn’t find one and created an application with React that calls an Asp.Net core Webapi, using Axios. It turns out that the parameters do…
-
-1
votes1
answer763
viewsReact Axios Network Error
I am doing my first course of Reset with Xios and found problems making get calls. The relevant code is: api.js: import axios from "axios"; const api = axios.create({ baseURL:…
-
-1
votes1
answer286
viewsAXIOS SENDS 2 REQUESTS INSTEAD OF 1
Summary : When I Make Backend Requests with Postman all goes well, but when I make requests with Front-End Reactjs Axios 2 requests come to the API, 1 without Token and the other with Token. I am in…
-
-1
votes1
answer87
viewsORDER OF EXECUTION VUEJS
Good afternoon, Gentlemen. Using Vue with lib and not as a framework, I have two functions that make requests for two endpoints, where the first I get a token and the second I need to pass the token…
-
-1
votes2
answers43
viewsSelect a specific JSON array with Javascript
I created a script with Axios to resume a call, then the result: [ { FieldId: 8095, FieldName: 'Nome1', FieldValueIds: [ 12059 ], FieldValues: [ '9.000' ], IsFilter: true, FieldGroupId: 99,…
-
-1
votes1
answer25
viewsHow can I avoid intermittent Cors errors with Axios and Vue.js requests?
I have an application developed in Vue.js that performs requests through Axios for an api developed in Node.js with express. My problem is that in 3% of requests CORS is blocked by locking the…
-
-1
votes1
answer54
viewsHow to run a function only after a Javascript API call?
I’m stuck in a situation here which is as follows: The project is done in React import hostApi from "api/hostApi"; const body = { token: localStorage.getItem("suavagaToken") } function…
-
-1
votes0
answers23
viewsChange parameter in API call with Reactjs
I’m using Axios to consume an API and create a personal project. endpoint is this: https://www.freetogame.com/api/games I added a "Learn more" button where I would redirect to a "page" where there…
-
-1
votes0
answers19
viewsI can’t get specific data from the Json API using Next with React js
I am using this API https://akabab.github.io/superhero-api/api/ and I can even get the data of all the characters with the call https://akabab.github.io/superhero-api/api/all.json, but when I make a…
-
-2
votes1
answer5380
viewsHow do I send the body in a request (POST) on Xios?
axios({ method: 'post', url: 'https://backend.tangotechapp.com/REST/getTokenRequest', headers: { 'Content-Type': 'multipart/form-data'…
-
-2
votes1
answer58
viewsAPI get/put error
Hello, everybody! I am studying nodejs and React. I built a little project that performs a crud with Mysql database. The project is to show and edit employees(employees) of a company. I can register…
-
-2
votes1
answer388
viewsI need help to configure Axios client according to Wi-FI/3G/4G network
I’m developing an app in React-Native using expo, and the app works well on the Wi-Fi from here, but it should also work outside of here, and we have a firewall port that points to API nodejs by our…
-
-2
votes1
answer420
viewsError 404 in POST with NODE and REACT
I am building an application with nodejs in the back end and React in Frond-end. I made a registration function but I can not perform the POST, returning: xhr.js:178 POST http://localhost:3333/users…
-
-2
votes1
answer66
viewsI’m not talking about displaying Github’s content on screen, so according to the exercise, someone will help me?
/*Create a screen with one that should be named after a user on Github. After typing the user name and click the search button the application should search for the Github API (as per URL below) the…
-
-2
votes2
answers708
viewsHow can I catch error 401 when making a post using Reactjs Xios on a login screen?
I’m making a login screen, I have a function that posts an API sending user and password, and gets a token back from being correct (so far so good), or returns error 401, which is shown in the…
-
-2
votes1
answer238
viewsReact Native Flatlist is not rendering results
I’m trying to show a box with a result of an Axios request using Flatlist but the screen is just blank, no error or anything. export default class Home extends Component { state = { posts: [], };…
-
-2
votes1
answer86
viewsUpload React-Native image with Xios and Multer, backend with nodejs
I need to upload an image pro backend and save it, but the api function does nothing Function calling the Axios const teste = () =>{ console.log(picture) Axios.post(apiPath+'/api/addPostagem',…
-
-3
votes2
answers550
viewsHow can I leave the dynamic baseURL in React
Hey, guys, what’s up? I have a question and would like help, I am using React to make a web page where any user can use it to consume Apis. To do this I am using the Tips, my question is the…
-
-4
votes3
answers116
viewsHow to return the value of a file outside its scope
[I hate javascript/typescript] Here’s the thing, I have a problem where I need to get the result of a file with Axios and return to a function in React. Is there any way to do that ? I want to…