Skip to main content
0 votes
1 answer
43 views

How to use abort signal directly in axios api request?

I want to cancel API request when leave page using abort signal in my axios request, i can pass signal via method param but i have to re-write/pass signal everywhere, this is not effective if i have ...
tan truong the's user avatar
-4 votes
0 answers
41 views

ExpressJS API integration [closed]

I've been trying to build an API integrated section for my website since it needs a news section. I have a small amount currently built but am struggling with getting it to work. This is through using ...
DPDDExamUser-16's user avatar
-3 votes
0 answers
61 views

Express route /api/test returns 404 Not Found even though it’s defined

I have a simple Express server listening on port 5002. In my server.js I’ve defined a test endpoint: // server.js import express from 'express'; import cors from 'cors'; const app = express(); app....
Narges's user avatar
  • 1
-1 votes
0 answers
42 views

My Axios code successfully calls API endpoints but data doesn't work with Vue components

Link to my Python backend code. Link to my separate Axios code (which works). Link to my Vue project with the Axios code built in (which doesn't). I posted some API questions here a few days ago. ...
user14892837's user avatar
0 votes
0 answers
63 views

How to control the order of promise's callback [duplicate]

I have promises like this, var results_arr = []; var promises = []; for (var i = 0 ; i < items.length;i++){ var url = `/api/stat/${items[i].id}`; promises.push( ...
whitebear's user avatar
  • 12.5k
-1 votes
1 answer
29 views

Conditional type for Axios return based on function arguments

The function axiosGet: export const axiosGet = async <TData>({ url, params = {}, onDone, onError }: TypeAxiosArgs<TData>) => { try { const r = await ...
K i's user avatar
  • 615
0 votes
0 answers
19 views

React Tanstack Query useInfiniteQuery network issue

I have a React app with a profile outlet route, where the index is the 'products'. I also have a similar route called 'savedProducts'. The difference is that the 'products' page lists by outletparam (...
benericsi's user avatar
0 votes
1 answer
38 views

How to pass variables other than the Promises between multiple .then() chains?

After looking up answers about how to download files with Axios in React I implemented the following code: const [fileName, setFileName] = useState("") const [extension, setExtension] = ...
user28751094's user avatar
0 votes
0 answers
55 views

How to download a document from Express-Node.js backend through a HTML hyperlink (<a>) on the frontend?

I know I can download static files from frontend with <a href="/path/fileName" download>MyDocument</a> , but I need to download dynamic files that can be uploaded and deleted by ...
user28751094's user avatar
0 votes
0 answers
28 views

In a React project, after updating MSW, tests return an empty string

The configuration settings are as follows vitest.config.js /// <reference types="vitest" /> import { defineConfig } from "vitest/config"; import react from "@vitejs/...
YeonU1i's user avatar
1 vote
0 answers
30 views

Why aren't my variables passed to my Tanstack mutation function

I'm trying to start using Tanstack and am having problems passing variables into mutation functions. In the following, "newTodo" is returning undefined. <script setup> import axios ...
daprezjer's user avatar
  • 912
0 votes
0 answers
28 views

How to modify/complete url on execute in useAxios from vueuse? Or: How to delete item using useAxios?

I'm building a Vue application which makes requests to an REST-API. I want to use "useAxios" from vueuse to make theese requests like below: const {data: todosList, isLoading, error, execute}...
Jakob's user avatar
  • 170
-1 votes
0 answers
31 views

ExpressJS Res.Download() Not Sending File to Download

I am trying to download the file from expressjs backend using Axios. The file is of size 1kB but on attempting to download it every time, I am getting 17 bytes file that does not open. Here is my ...
Waleed93's user avatar
  • 1,310
-1 votes
0 answers
25 views

CORS error - cross-origin resource sharing error wildcard origin not allowed in different browsers when i use my local server [duplicate]

I am writing and testing a full-stack application. My frontend is uploaded to hosting and has the address for example - planner. And my server is on a local computer with a database. For the test, I ...
SolarMan's user avatar
0 votes
1 answer
100 views

CORS Issue When Using External Service for API Calls in Next.js"

I am encountering an issue with Next.js that I don't quite understand. I have a service file that I want to use to make API calls faster and more structured. However, when I call the API via this ...
Kevin's user avatar
  • 11

15 30 50 per page
1
2 3 4 5
1639