R
R
regix2017-07-15 18:04:18
JavaScript
regix, 2017-07-15 18:04:18

How to get cookies from API?

I'm making a request from a Vue front-end application using the Axios of my API endpoint, which is on a different domain. I successfully receive the JSON, but how can I get the cookie value as well? My response does not have these cookies.

mounted () {
    axios.get('http://localhost:7777/api/data')
      .then((res) => {
        console.log(res)
        this.apiData = res
      })
  }

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
RidgeA, 2017-07-15
@regix

document.cookie

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question