Use Api

hi friend...

In localhost, we are designing the front end of site by React. We want to use cs-cart APIs, but we get an error when sending a request:

request n react by Axios:

useEffect(() => {
  axios.get('https://alaedeen.com/cs_cart/api/products', {
    headers: {
      'Authorization': `Basic ${token}`
    }
  })
  .then(response => console.log(response))
}, [];

in network section browser:


request and response Header in OPTIONS Method:

OPTION Method:

GET Method:

Please tell me where the problem comes from and how it is solved? Thanks.

Please tell me where the problem comes from and how it is solved? Thank

2022_02_15_05_22_15_Settings.png

OPTIONS.png

GET.png

please help me... :-( :-(