HTTP-functions stopped working on my premium site but work on exact copy free site
on August 14 2023 clients could use an API on my site. When they tried to use it again last week it no longer worked and the coding in http-functions had not changed.
After several long days of trying to solve this I made an exact duplicate of the premium site to a free one with identical code and the http-functions work okay.
Obviously the end points used to access the API by clients are different.
Were there any changes in the domain name for the premium site where your HTTP Functions are hosted?
Please note the endpoints for calling your API can change depending on whether you are developing on a premium site. These are the formats for calling http function endpoints:
Try to capture the response on your POST method endpoint on the premium site. If you are using the classic editor, you can also use the Functional Testing functionality to directly call your http function.
If there are errors, posting them here (without PII such as urls/domains) could help solve this issue.
There is zero response to the POST to the premium site which tends to indicate a back end connection problem on your servers as it appears nothing at all happens and no code is executed. I’ve tried inserting console logs etc to monitor progress but nothing comes back.
There is a full working response to the POST method using the identical code except for the change in end point on the FREE site
The code worked perfectly a few months ago and nothing has changed.
From memory I had to put a user agent in the api code for the premium site (was not required for the free site or previously for the premium site)
e.g. $agent = ‘Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)’;
This being a line in the php code used by third parties to access the api on my site.
It took me days to work it out. Wix does change things sometimes and does not always tell everybody about the impact on websites which require updating.