Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 00:07
    github-actions[bot] labeled #2713
  • 00:07
    github-actions[bot] commented #2713
  • 00:06
    github-actions[bot] labeled #3323
  • 00:06
    github-actions[bot] commented #3323
  • Nov 29 13:15
    chinesedfan commented #3431
  • Nov 29 07:23
    xianshenglu opened #3448
  • Nov 29 07:23
    xianshenglu labeled #3448
  • Nov 29 07:18
    github-actions[bot] closed #3447
  • Nov 29 07:18
    github-actions[bot] commented #3447
  • Nov 29 07:18
    xianshenglu labeled #3447
  • Nov 29 07:18
    xianshenglu opened #3447
  • Nov 29 03:00
    hm-lijojohn commented #3192
  • Nov 28 17:04
    shicholas commented #2889
  • Nov 28 06:34
    pradipvadher commented #2889
  • Nov 27 17:47
    shicholas commented #2889
  • Nov 27 17:46
    shicholas commented #2889
  • Nov 27 15:10
    ffflorian edited #3446
  • Nov 27 15:09
    ffflorian edited #3446
  • Nov 27 13:50
    ffflorian opened #3446
  • Nov 27 12:20
    genie-youn commented #3445
pg13
@Pg_hello_twitter
how to call an auth0 secured api using axios , any reference ?
Xianming Zhong
@chinesedfan
Hello everyone, I found lots of users met different problems with axios. And much of them were not bugs of axios, but misleading usages. So I wrote a guide for beginners. https://github.com/chinesedfan/You-Dont-Know-Axios, ENJOY!
Neil Duffy
@skiv71
Hi, I recently found axios converting an axios.post to a GET request, because of the lack of a trailing slash on the url. Google searches show this being identified as a bug back in 2018...
But i've been using the latest npm install and still saw it... and it cost me a few hours of debugging
Peter Tönnies
@peter.toennies_gitlab
Dear all, my name is Peter and I am voluntarily working for foodsharing, a big NGO fighting food waste in the central European area. Me and a small group of devs are trying to keep our platform running... with more or less success. At the moment, I need to get rid of request.js and would like to convert to axios. But to be honest... I am rather lost, as I do not even speak JS.
Therefore, I would like to ask in this group, if someone would be interested in donating some time to our cause and to help me with this step. I am just talking about two small methods between line https://gitlab.com/foodsharing-dev/foodsharing/-/blob/master/chat/test.js#L366 and 380. I would be very grateful if someone is interested in helping me. I am losing too much time on a topic I am not trained in.
Thank you very much, if someone can jump in. In any case, very kind regards to the whole group. Peter
Daniel Vela
@develalopez
Hello everyone, I'm having a really weird issue with interceptors. I create a custom axios instance with a base URL to my API, and I add an interceptor to said instance when an user authenticates correctly. But when I try to use that instance in a data fetching service, the interceptor is not there as if the instance was different.
Daniel Vela
@develalopez
also same issue happens with the regular axios instance
Sil3nt_One
@pratham2003
Hi
Is it recommended to re-use axiox instance for consuming all endpoints under a single API throughout the app?
Are there any drawbacks?
lithium3d
@lithium3d
Hi, I have a problem or a bug with axios. I make a post to laravel and laravel returns valid json. But when I want to grab the data form the response, axios has added a lot of data before my response so it is not possible to normaly grab the response back. I first need to substring it with a indexOf does anyone know a solution to my problem?
benjaminh
@benjaminh
Hello there, first time using axios (within vuejs app). I was about to fill in an issue on github but maybe I should ask there before. Also, I have created a post on SO, but I think I have narrowed the problem to something probably related to axios. Could I ask for some help here ?
essi
@essivision
Hi
harishcs
@harishcs1_twitter
Hi
I am sending the following urI as get request
When execute the same on postman the response is
{
"totalSize": 1,
"done": true,
"records": [
{
"attributes": {
"type": "Orderc",
"url": "/services/data/v11.0/sobjects/Order
c/a2F3D0000TLeUUAW"
},
"Name": "WO-00037151"
}
]
}
when I execute the same on Axios my response is:
data: { totalSize: 1, done: true, records: [ [Object] ] }
harishcs
@harishcs1_twitter
The data next to records is not rendered in json please help
konduri123
@konduri123

Hi ,

I am trying to get the redirected url's of the given URL, where i am using node js module on lambda with axios. Can any one give me the solution or code snipet, for getting redirected url.

Currently i am getting using node js as final redirected URL as "response.request.res.responseUrl", but in my aws lambda i am not able to get this.

Konstantin Bläsi
@konstantinblaesi
maybe you're not using the same node version locally as in aws
Andrey Doroschenko
@dorosch
Screenshot from 2020-07-03 11-23-49.png
Screenshot from 2020-07-03 11-24-04.png

Hi guys
Could you help me? I tried to make a request with axios but axios ignore header Set-Cookie.

Here's instance of axios:

const API = axios.create({
  withCredentials: true,
  baseURL: 'http://0.0.0.0:8000/api/v1'
})

And attach some screens for proofs. Axios ignore headers about cookie and doesn't store cookie in local storage.

1 reply
Manikanta
@sai1139
hi
i'm creating the the feature request in github.it was closing automatically does not follow the issue template.
can anyone help
Donavan Becker
@donavanbecker
Just wondering if there is away to see what the a ‘get’ or ‘post’ sends? I am just getting a 400 error.
Ashokkumar
@Ashokkumar93
how should I delete Accept-Encoding or set Accept-Encoding: null on request
xhr.js: Refused to set unsafe header "Accept-Encoding"
Yuba Raj Khadka
@yubi00
hi everyone, can anyone help me?
here is my issue
unfortunately, no one replied there
just wondering, if this is a problem related with proxy or somthing else
Moritz Bischof
@NyxCode_gitlab
Hey, axios 0.20 just broke my app.
This line, which previously worked, has no effect now:
axios.defaults.baseURL = '/api'
what's happening here? everything worked in 0.19
Moritz Bischof
@NyxCode_gitlab
yeah, wtf is going on here. only related thing i found in the changelog is axios/axios#2391, but i dont know
just tested, everything's fine on 0.19
Jonas Amundsen
@badeball
Hi! My impression is that axios doesn't by itself attempt to store cookies received and use them for consecutive requests, is this true?
This is in a node-environment
~gautham~
@gauthamilango_twitter
Hello!
I have an issue with Axios. I am working on a React Native project. We are using Axios to make the network calls. Whenever we try to make network call after changing the date and time to past, like six months back via android devices Date & time settings, Axios throws a Network error
How can we fix it?
quanganhtran
@quanganhtran
good morning! is there any breaking change in 0.20.0?
I want to update but im not sure if breaking changes are marked as such
Prashant Singhal
@PrashantSinghal619
Hi everyone,
I am creating an instance of Axios (let's sat client) and providing some custom config to it.
Now when I call client().get('/api/endpoint'), is there a way to extract the URL provided to get() inside the client function implementation in which I do the job of creating an Axios instance? I want to check something based on URL parameter criteria.
Here's my implementation of client():
import Axios from 'axios';
import { apiBaseUrl } from '../constants/configuration';

const TYPE_JSON = 'application/json';

export const buildAPIInstance = ({ contenttype = TYPE_JSON }) => {
  const objAxios = Axios.create({
    baseURL: apiBaseUrl,
    headers: {
      common: {
        Accept: TYPE_JSON,
        'Content-Type': contenttype
      },
      post: {
        'Content-Type': TYPE_JSON
      }
    }
  });

  return objAxios;
};

const client = (params = {}) => buildAPIInstance(params);

export default client;
Prashant Singhal
@PrashantSinghal619
nevermind, found it
for anyone willing to know the solution, here it is:
I used axios.interceptor API like this:
objAxios.interceptors.request.use(config => {
  if (config.url) {
    // do something
  }
})
José Valente
@JFDValente
Hello friends, you need your help, I am configuring timeout for my request, but it is not applied in OPTIONS requests, does anyone know why? const bffClient = axios.create({ baseURL: <URL>, timeout: 5000, });
Pavel Severov
@pavelseverov

Hi, axios v.0.21.0 causes node.exe to silently crashing, without possibility to catch the exception. Occurs with node.js v.14.15.0 (current LTS Version, recommended for most users). Earlier or later versions works Ok (I have tested v.9.11.1 and v.15.1.0)

Effect is not stable and not easy to be quickly reproduced, appears mostly on bad/slow internet connections. Most probably because of “connect ETIMEDOUT”, but this is only my guessing, because node.exe just unexpectedly terminates, without any additional info.

Please recommend – should it be reported as a bug to https://github.com/axios/axios/issues/ or not?

This is the code for reproducing the problem (actually nothing special, just continuously getting lots of data). Tested on the Windows 10 1909.
MyApi is url/config of service-now.com REST API. Unfortunately I can’t share it.

var axios = require('axios');
let n=1;
test();
async function test() {
  do {
    await axios.get(MyApiUrl,MyApiConfig)
      .then(res => console.log(n++, "got "+JSON.stringify(res.data).length+" bytes (node.js "+process.version+")"))
      .catch(err => {console.error("ERROR: "+err.message);process.exit()})
  } while (true)
};
avi12
@avi12
Hey, I need some help:
I'm using Electron, and I need to download a file while using the renderer process, as well as display the progress and allow the user to cancel the download.
How can I achieve this with Axios?