Hi,
I am reading the following documentation: https://docs.microsoft.com/fr-fr/gaming/playfab/features/data/playerdata/entity-files
But I cannot find in the C++ SDK the equivalent of these two C# functions used in your sample:
PlayFabHttp.SimplePutCall and PlayFabHttp.SimpleGetCall
It seems I cannot make a WinHttpOpenRequest function call with GET and PUT HttpMethod.
In your function:
void PlayFabWinHttpPlugin::ExecuteRequest(std::unique_ptr<CallRequestContainer> requestContainer)
...
hRequest = WinHttpOpenRequest(hConnect, L"POST", urlComponents.lpszUrlPath, NULL, WINHTTP_NO_REFERER, NULL, winHttpOpenRequestFlags);
So I created a Cloudscript function to make a http request and it works fine but I want to know how to do this directly by usign your C++ SDK.
Thanks in advance for your help.
Answer by Citrus Yan · Dec 11, 2019 at 09:21 AM
The PlayFabHttp.SimplePutCall and PlayFabHttp.SimpleGetCall method are from the UnitySDK, which you can find the definition in here:
However, referring to the C++ SDK, looks like it does not natively support making Get/Put http requests, hence, to make Get/Put requests in your C++ project, you might want to consider implementing this feature yourself, and, you may find this C# implementation helpful: SimplePutCall.
Ok, thanks for your answer.
For many reasons, I don't want to make any changes in the source code of the C++ SDK.
So I just checked the code and I think the best way to do it is to implement my own version of the HttpPlugin for all platforms and provide them to the PlayFabPluginManager via the SetPlugin function.
What do you think of this workaround?
But in my opinion, it would be much easier for all the users of your C++ SDK to provide an HttpPlugin with GET and PUT http methods as you did it in your Unity SDK.
Sounds great to me! And, about providing a HttpPlugin with GET and PUT http methods in the C++ SDK, please make a feature request to help us improve the service here:
https://community.playfab.com/spaces/24/index.html
The more information we have on the needs of our developer community, the better we are able to prioritize our work, again, thanks for your feedback!
Answer by tldQuantic · Dec 12, 2019 at 05:04 PM
Ok, thanks for your help.
I will make a feature request about this topic.