Questions tagged [axios-cookiejar-support]

This library was created to aid in cookies being read and written from and to a response and request. This allows consumers to store and then subsequently send cookies with XHR requests that use cookies for authentication for example.

Here is the Git repository for this library.

5 questions
438
votes
19 answers

axios post request to send form data

axios POST request is hitting the url on the controller but setting null values to my POJO class, when I go through developer tools in chrome, the payload contains data. What am I doing wrong? Axios POST Request: var body = { userName: 'Fred', …
Srikanth Gowda
  • 6,163
  • 7
  • 19
  • 34
17
votes
1 answer

POST with Body Not Passing Cookies

I'm using the axios-cookiejar-support library. I have a POST that contains a body, and for some reason, the Cookies aren't getting injected into the request. What did I do wrong here: return axios .post( urlJoin( …
Mike Perrenoud
  • 66,820
  • 29
  • 157
  • 232
1
vote
2 answers

Unauthorized error when trying to access an API using AXIOS in NodeJS

I am trying to access free API data using AXIOS module in NodeJS. Below is the code sample of the same and it is giving HTTP 401 status code - unauthorized error. Code Sample : const axios = require('axios'); const axiosCookieJarSupport =…
BeingSuman
  • 3,015
  • 7
  • 30
  • 48
0
votes
1 answer

axiosCookieJarSupport is not a function

I am attempting to use the axios-cookiejar-support library to no avail. Here is my code: const axios = require('axios').default; const axiosCookieJarSupport = require('axios-cookiejar-support').default; const tough =…
Nash Anderson
  • 70
  • 1
  • 8
0
votes
1 answer

How do I add a cookie jar to axios in typescript?

The following code is used to add a cookie jar to an axios instance. It fails because the interface AxiosRequestConfig doesn't contain a member named "jar". Can I augment the existing AxiosRequestConfig type, or is there a workaround for…
jsparkes
  • 161
  • 1
  • 11