Hey! I’m working on connecting my site to an external service I have hosted on AWS. Here’s my connecting code (trying to grab a value from the response header.) I know the request hits my service and works, but I can never get the data from the response! The service should take about 30 seconds to respond, if that helps.
import { fetch } from ‘wix-fetch’ ;
$w . onReady ( function () {
doFetch ();
})
async function doFetch ( ){
fetch ( “example_URL” , { method : ‘GET’ })
. then ( response => response . json ())
. then ( Headers => console . log (Headers))
. catch ( error => console . error ( error ));
}