I’m trying to call a javascript function from an external javascript file. I imported “wix-fetch” in backend code and created a function to fetch the javascript file. I then imported the backend function in the page. However, the function in backend code never gets called even to console plain text.
Have you read the Wix API reference about Wix Fetch and also the Wix Support pages about it too?
https://www.wix.com/corvid/reference/wix-fetch.html
https://support.wix.com/en/article/corvid-accessing-third-party-services-with-the-fetch-api
https://support.wix.com/en/article/corvid-calling-server-side-code-from-the-front-end-with-web-modules
Or do you actually need to be using HTTP Functions?
https://www.wix.com/corvid/reference/wix-http-functions.html
https://support.wix.com/en/article/corvid-exposing-a-site-api-with-http-functions
An example for you.
https://www.wix.com/corvid/forum/corvid-tips-and-updates/example-myapi-and-myapiclient
Thank you for the references. I’ve read them and yes I believe I need Wix Fetch as I’m trying to integrate a third-part app