All Questions
493 questions
0
votes
1
answer
29
views
Nifi API gives 400 invalid request from NodeJs Axios (works fine through curl or postman)
I have Apache nifi running locally.
I am able to access api url as below (generated from postman).
curl --location --insecure ^
"https://localhost:8443/nifi-api/access/token" ^
--header &...
0
votes
1
answer
27
views
Retrieve full url from shortened url using axios and js
https://s.lazada.com.my/s.ny94J
Given the shortened url is as above, when paste it in a browser, it will redirect me with full url where I can extract the product id from it
But in my code, I can't ...
0
votes
1
answer
123
views
Axios ETIMEDOUT error for a simple http call, why?
I made test case demo that you can clone and run with a single command:
https://github.com/nemanjam/axios-timeout-error-demo
It doesn't fail every time but in maybe 70% of cases. The confusing thing ...
0
votes
0
answers
24
views
Random Network Error in Axiom+vue+laravel
So, I have a Laravel + Vue 3 app, that uses Axiom to send requests to get data from external API service. Sometimes i get complains from clients, that they get an error, and most of the time it's &...
0
votes
0
answers
29
views
Axios this$1.originalAdapter.call is not a function after upgrading from 0.28 to 1.6
After upgrading axios versions from 0.28 to 1.6.4 our simple axios.get call throws an error of:
this$1.originalAdapter.call is not a function
The call is never made. There is no network activity.
The ...
0
votes
0
answers
56
views
How to stop HTTP error codes from automatically being logged in the frontend?
I am trying to make a login system using a typescript/react frontend and a typescript/nodejs backend. Currently, when the user is logged out, my backend returns a 401 (not authorized) error code, ...
0
votes
0
answers
132
views
Axios Network Error in React Native project - how to handle this issue?
At first I started to develop my mobile app using Expo, but then migrated the components (and generally the whole UI) to plain React Native (react-native). No matter what I am trying to do (e.g login, ...
1
vote
0
answers
41
views
Need help optimizing request forwarding for Node JS API
I am trying to write a front facing API route that will receive an incoming HTTP post request and forward it to a separate server of mine for processing. The reason I have this front facing API is ...
0
votes
0
answers
88
views
@nestjs/axios - Axios Only Returns 502 Errors When Request Fails
I am currently facing an odd problem with Axios (through NestJS HttpService):
I have some Nest endpoints that make HTTP requests to another service. When the HTTP request succeeds, I get a good ...
0
votes
0
answers
37
views
On session expire open react dialog in app axios instead of prompt
On session Expire , if any of the API fails then status code comes out to be 401 and we show prompt to ask password and re new the token again . But problem is that we do not want to show prompt we ...
0
votes
0
answers
12
views
How to send form-data with string and file in reactjs
const addNews = async () => {
let titleErrorText = "";
let textErrorText = "";
let imageErrorText = "";
if (!title) {
titleErrorText = "...
0
votes
2
answers
40
views
AXIOS put request doesn't hand JSON parameters to endpoint [duplicate]
I'm currently programming in VUE.
This is a endpoint I made with fastAPI to add a location
In order to add locatons from my component, I created a function in my VUE component called fetchNewLocation:...
0
votes
1
answer
525
views
how to do react axios interceptor setup where if local storage don't have accessToken then want to clear local storage and navigate user to login?
Suppose I am creating a React project, and in that project, I want to set up Axios. For Axios setup, I am creating an Axios interceptor file where, before each API call, I am checking if this domain's ...
1
vote
0
answers
80
views
axios post request keeps on pending in browser (works fine in postman)
I am trying to create a post request to send files to the server. I am using multer for file uploads and setting some file validations in the backend (only jpeg supported and less than 5mb). When I ...
0
votes
1
answer
43
views
I was trying to connect my react frontend with java backend using axios. But I got stuck as "'then' is undefined" runtime error occurs
function HelloWorldRestApiCall() {
axios.get('http://localhost:8080/hello-world')
.then((response) => successfulResponse(response))
.catch((error) => errorResponse(error))
...