Im trying to insert many rows at once in my DB but im getting an error

im trying to insert many rows at once in my MySQL db with Laravel 8 and axios but im getting this error this is my db table called auroracoins the api where im taking the data is like this Here is my axios call async insertar(history_records) { try { console.log(history_records) const response = await axios … Read more

React userSelector gives undefined value for the first time

Im fetching data from api using axios, in the api https:/...?vs_currency=${currency}&... I am trying to assign currency value to api using redux. The problem is useSelector gives the undefined value for the first time and i failed to fetch data from this api. But then useSelector works fine. Error display is https:/...?vs_currency=undefined&...

how do i use vue.js to display API array as bootstrap cards using axios

I Dont really understand Vue that well yet but i am trying to get a card display of my products from my API i created. i managed to display everything in php code by using a while loop and that worked great but i want to try it with axios and vue. my array keys are in the html code but i think i am calling them wrong aswell as not understanding the logic to create a while loop. ill post the php code to show what i am trying to do with vue and axios at the end of this post. app is just to show that my api is working, app2 is the code to get the display.

Consume Api in React

What is the good ways to consume api in react. i am make file to handle api to get data. And i consume in another file, but that’s make the data from api become undefined before return the real. Movie.js import { useState, useEffect } from ‘react’; import axios from ‘axios’; const apiKey = ‘apikey’; … Read more

Axios doesn’t give neither .then or .catch response after POST

I’m trying to do a post in a localhost SQL DB with react/nodejs. Fortunately it does POST and the information goes to the DB. I wanted to put an alert() inside the .then() if it was sucessfull and another alert() inside the catch() if there was a error. The problem is that it gives both ‘success’ alert and ‘error’ alert when posting, although it posts all good in the database. Am I missing something?

How should I do a post request to this url by using Axios (React)

I have to make a post request to sort of complex url :http://localhost:8080/api/login? according to swagger-ui. The examples at axios’s github page says that the second parameter is an object. In my example the second parameter must include email and password properties but after that? I tried many ways to pull this situation of. One of these is below. By the way this error occurs: xhr.js:187 POST http://localhost:8080/api/login?email=asdsadsad&password=[object%20Object]