I want to call my Wix site from a remote server. I have an API set up using the example at http-functions.js which accepts two numbers and multiplies or adds them then returns the result in JSON format. The example works correctly when I call https://my-site/_functions-dev/example/multiply?leftOperand=10&rightOperand=15 from a browser but when I call the same URL using the CURL functions within PHP I get an error: “Empty reply from server”. One possibility is that the problem may be related to headers that may be set by the browser but not set by CURL. Any ideas?
See Example: MyApi and MyApiClient for exposing and accessing a site API. I can’t help you with PHP, but the MyApiClient example will show how to set up the proper fetch to access the API exposed in the MyApi (server) site.