by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 10:25
    ProteanCode edited #3114
  • 10:25
    github-actions[bot] closed #3114
  • 10:25
    github-actions[bot] commented #3114
  • 10:25
    ProteanCode labeled #3114
  • 10:25
    ProteanCode opened #3114
  • 07:21
    github-actions[bot] closed #3113
  • 07:21
    github-actions[bot] commented #3113
  • 07:21
    mykola-mokhnach labeled #3113
  • 07:21
    mykola-mokhnach opened #3113
  • 03:23
    nayanbhana commented #2485
  • Jul 09 18:17
    JNotelddim commented #3095
  • Jul 09 18:17
    JNotelddim commented #3095
  • Jul 09 18:16
    JNotelddim commented #3095
  • Jul 09 15:13
    shayneo synchronize #3111
  • Jul 09 15:07
    shayneo synchronize #3111
  • Jul 09 14:57
    MoonSupport commented #3104
  • Jul 09 14:30
    jasonsaayman commented #2873
  • Jul 09 13:38
    MoonSupport commented #3111
  • Jul 09 13:22
    NotMoni commented #2130
  • Jul 09 11:47
    dropsonic commented #2899
HanTengfeifei
@HanTengfeifei
HELLO
Jing Yi Wang
@namelesswc
Hello. I am creating a post request and I got confused to where to put in my request body. After reading the doc I can pass it in as data parameter: axios.post(url[, data[, config]]) but when I check out config it also has a parameter called data. So which is the one where I but my request body in.
George Kurobara Benjamin
@georgeben
Hello, please I am having an issue with ejecting an interceptor. Here's a link to the issue axios/axios#2615. After ejecting an interceptor from an axios instance, when I console.log() the axios instance, it is still thesame, i.e I still see the ejected interceptor as part of the request interceptors of the instance. Is it supposed to work this way? Thanks for any axplanation.
coldSeattle
@coldSeattle
hey everone
i have a problem with axios
can everyone help me&
?
i can not send a get to server
somefunction is not a function
Keisha Shepherd
@kshep425
@coldSeattle I have a problem too. Want to troubleshoot together?
The Tiến
@dthtien
hi guys. I have trouble with the intercepters hook. how can I make sure the refresh_token API in the code bellow call once if I have 2 or more API requests call at the same time?
thanks for supporting <3
httpClient.interceptors.response.use(
  response => response,
  error => {
    const isTokenRefreshing = 'isTokenRefreshing';
    const { response: { status, data: { key } }, config } = error;
    const isValidRefreshToken = !localStorage.getItem(isTokenRefreshing) && 
                                  status === UNAUTHORIZED_CODE &&
                                  key === REFRESH_KEY
    console.log("isTokenRefreshing", localStorage.getItem(isTokenRefreshing))
    console.log("status: ", status, " key: ", key)
    if (isValidRefreshToken) {
      localStorage.setItem(isTokenRefreshing, true);
      return  httpClient.post('fresh_token').then(() => {
        localStorage.removeItem(isTokenRefreshing)
        return httpClient(config);
      }).catch( error => {
        localStorage.removeItem(isTokenRefreshing)
        localStorage.removeItem('login');
        window.location.replace('/login');
        return Promise.resolve(error);
      });
    }

    // while(localStorage.getItem(isTokenRefreshing)) {
    //   console.log('refreshing')
    // }

    if(status === UNAUTHORIZED_CODE && key === REFRESH_KEY){
      localStorage.removeItem(isTokenRefreshing)
      return httpClient(config);
    }

    return Promise.reject(error);
  }
);
Dan Pastori
@danpastori
Hi Everyone, I have question with setting cookies with axios. I have my CORS set up server side to return an XSRF-COOKIE. I'm trying to send that cookie in the X-XSRF-TOKEN header that I append to each response. However, when I send it with axios it places it in the 'Cookie' header. I am using the basic default axios config with the same naming conventions in the documentation, but I can't figure out why it's sending in the cookie header and not the X-XSRF-TOKEN header. Any help would be greatly appreciated!
I get the set-cookie response properly from the server and it's only an http cookie.
I also make each request withCredentials: true
I can also provide any code samples necessary
NinoSoles
@NinoSoles
Screen Shot 2020-01-21 at 10.17.48 PM.png
anyone know why axios is giving me 404 when im posting and providing the correct form data?
ive tried qs.stringify() and it gives me 400 error code
im using the same headers and form data on python requests and it works fine
Luiz Bueno
@luiz504
image.png
Hello guys could anyone help? I'm trying to cancel a post but when I trigger the cancel function the error is triggered (checked printing the catch error) but the call continues ...
Eugene Balashov
@AliveDD
hi all :) does anyone have opinion about: async.parallel vs axios (node app)
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.

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