[Vuejs]-How to Communicating with an API (curl -X) in Vue?

0👍

This should do the work:

 fetch("http://magento.example.com/rest/V1/wishlist", {
    method: "GET",
    headers: {
      Authorization: "Bearer pbhercbtk6dd3eatf1pyx8jj45avjluu"
    }
  })
    .then(res => res.json())
    .then(response => {
      console.log(response);
    });

Leave a comment