Backend script:
import {fetch} from ‘wix-fetch’ ;
export function EncryptedUrl() {
return fetch(url, {method: “GET” ,
headers:{
‘Authorization’ : 'Bearer xxxxx ,
‘Content-Type’ : ‘application/json’
}
})
.then(response => response.text())
.then( function (response){
console.log(response);
return response; //response carries url which need to be used in frontend for reloading page
});
}
frontend:
import {EncryptedUrl} from ‘backend/filename.jsw’
export function onclick(event){
wixLocation.to(link)
//How can i get the response i got in the backend to front end in link???
}
can some one please help