Fetch access-control-allow-origin

0

I'm calling an API with a fetch, when I make the call I get the following:

  

Failed to load link : Response to preflight request does not pass access control check: No 'Access-Control-Allow- Origin 'header is present on the requested resource. Origin ' link ' is therefore not allowed access. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

In the documentation they gave me two data: API Application *** Account: ********

I have this script for the api call:

const direccionUrl = 'http://mppromocionales.com/ws_products.php',
    parametros = {
      method: 'GET',
      mode: 'cors',
      redirect: 'follow',
      headers: new Headers({
        'Content-Type': 'application/json'
      })
    },
    request = new Request(direccionUrl, parametros)

I can not access and I do not know where I could add the data they give me in order to have access.

    
asked by CristhianDaza 09.10.2018 в 04:04
source

0 answers