I noticed a post on the Defold forum mentioning issues when making PlayFab API requests in Defold on desktop (HTML5 builds are fine) (Defold forum post). The conclusion from @Brendan was that "For this issue, I’d say the problem is the extra “/” in the URL (making the URL invalid). So the call isn’t actually getting out to us at all"
Now, I took a look at the LuaSDK code and came to this conclusion:
If we look at the PlayFabHttps_LuaSec.lua file (https://github.com/PlayFab/LuaSdk/blob/master/PlayFabClientSDK/PlayFab/PlayFabHttps_LuaSec.lua#L18-L31) we see that the fullUrl is constructed like this:
local fullUrl ="https://".. PlayFabSettings.settings.titleId..".playfabapi.com/".. urlPath
The same goes for PlayFabHttps_Defold.lua that is in PlayFabClientSdk.zip (btw where is the source to PlayFabHttps_Defold.lua in the repo?).
Now, if we look at the code that is calling MakePlayFabApiCall we see this:
IPlayFabHttps.MakePlayFabApiCall("/Client/AddFriend", request, "X-Authorization", PlayFabSettings._internalSettings.sessionTicket, onSuccess, onError)
The urlPath that is passed as first argument to PlayFabHttps_LuaSec.MakePlayFabApiCall (and the equivalent for Defold) starts with a '/' which will make the fullUrl have two '/' in a row. This will cause problems on some platforms as was observed in the original post on the Defold forum.
I'm willing to submit a PR but I as I wrote above I can't seem to find the code for PlayFabHttps_Defold.lua.