All Questions
463 questions
0
votes
1
answer
37
views
Wait for multiple times axios access finished [duplicate]
I have script like this below.
It start multiple API access.
var temp = [];
for (let i = 0; i < `10;i++){
var url = `http://www.myapi.com/api/?id=${i}`;
axios.get(url).then(...
0
votes
1
answer
39
views
NextJS can't connect to uwsgi directly
I'm trying to build an application with django on backend-side and nextjs on frontend-side. Backend is ran by uwsgi.
uwsgi --http 0.0.0.0:3000 -w project.wsgi --master --harakiri=60 --pidfile=uwsgi....
-1
votes
1
answer
84
views
Can axios call handle different response types?
I have an axios call as below
return axios.post(url, data, headObj)
.catch(err => {
return err.response;
});
Now there are 2 scenarios for the same endpoint;
If it is success response, I get a ...
0
votes
2
answers
2k
views
How to get a local file via fetch/axios?
For study reasons I need to use some of these network APIs like fetch or axios but to get a LOCAL file, so WITHOUT using fs module, or WITHOUT importing them.
I tried with both fetch and axios, but ...
0
votes
0
answers
167
views
Access to XMLHttpRequest at 'file:///C:/xampp/htdocs/Cap%C3%ADtol%2014/informacion.txt' from origin 'null' has been blocked by CORS policy:
I'm new in using xampp and AJAX. My error is in the console of my browser when I click a button and is:
Access to XMLHttpRequest at 'file:///C:/xampp/htdocs/Cap%C3%ADtol%2014/informacion.txt' from ...
-1
votes
1
answer
93
views
Realtime database. When I send a put request with date 0 (just the number 0), I get an error. Other numbers work
There is a Firebase realtime database, and the anime likes function has been implemented on the website. The problems come from removing a like, it is implemented like this: a get request is made, the ...
1
vote
0
answers
30
views
Removed cookie from request adding custom headers
I want add a custom header to my ajax call with Axios
I code this:
serviceInterface.interceptors.request.use((request) => {
request.withCredentials = true;
request.headers['x-zeus-...
0
votes
1
answer
37
views
how can i change value of parameters in a axio fetch fuction [duplicate]
I have the follow axios code fetch data like this , but cannot work.
getdata(par:any){
axios.get(url)
.then(response => par.sqltxt=this.trans.transray(response.data))
...
0
votes
1
answer
930
views
XSRF-TOKEN Mismatch during AXIOS request
Whenever I am requesting my server 2-3 times a second, axios request is going with different X-XSRF-TOKEN header as compare to cookies going with it.
let axiosInst = axios.create({
baseUrl: &...
0
votes
1
answer
294
views
How to fill form by clicking search bar dropdown in Laravel?
I have created a search functionality in a component in Laravel which is showing the data from the MySQL database in a dropdown which I implement by using Typeahead Js using this website tutorial.
...
-1
votes
1
answer
823
views
How i can fix CORS issue
hello i have try search for a day now on how to solve this problem i have searched both google and axios and youtube but still i can not solve the problem
this is the error on my console when i try to ...
0
votes
2
answers
222
views
Trying to test my php file on my local host but a blank white page just appears with no error messages
I have Apache and mySQL running, there doesn't appear to be any errors as I've checked all the logs; my aim here is to send an email to a specific address whenever there is a new form entry
Im ...
0
votes
1
answer
214
views
Can't finish request to API (React typescript - axios)
I generated typescript client with NSwag studio.
There is a part of the generated code:
user(authorization?: any | undefined, body?: AddUserDto | undefined , cancelToken?: CancelToken | undefined): ...
0
votes
0
answers
193
views
I'm trying to get data via axios to send a php server and save as a text file
Hi everyone i want to post data through async and receive it via php
this is my code but it returning empty
async sendMail(email, name) {
try {
const data = new FormData();
data.append('...
0
votes
1
answer
116
views
about axios ,how can I add a headers params in a request with abbreviation
So ,i am doing a project that i have to add a headers params in a request ,how can i add it in short codes?
i first use the method below:
const { data: { data } } = await refeshToken.put('/v1_0/...