Context:Stand alone WASM module installed through Marketplace (developer account)
Bug description: I am using fsNetworkHttpRequestPost function to send text data to the server, in response - server returns int number of the database record. While on PC it works properly in any way (installed through marketplace or community, in online or offline mode), it does not seem to send anything on Xbox - at least PHP script does not capture any data.
I have a guess that WASM data exchange does not work if user have no
Xbox Live Gold subscription active (i.e. online gaming features). Or maybe it’s issue in my code.
Repro steps: run sendLiveryTitle function, server should return “14” as text response but that does not happen.
As @FlyingRaccoon said, the problem in your code lies in the error code check. I have tried your package and received a 206 error code, which is a valid and success one (206 Partial Content).
I assume the code you have posted in your first message is the one you use, so the line
if (errorCode != 200)
is wrong in your case.
I advice you to filter each error code with a specific behavior, or if it is not necessary, accept all 2XX error codes as a success.
An HTTP 206 in this POST scenario would be an error, as they’re not performing range requests. I’d be curious to see the entire HTTP conversation if available.
@FlyingRaccoon@Arzop I have added some debug code on the server side and can provide additional information. Unrelated parameters (like paths) where removed. Very same add-on version was tested, which injested into marketplace and linked with my dev account, same aircraft, SU14 latest update.
You can notice some differences (like HTTP_CONTENT_RANGE > HTTP_RANGE), but most important - POST array is empty. Either fsNetworkHttpRequestPost does not work properly or char pointers not processed by Xbox c++ compiler/environment correctly (I have slightly different way of text passing to the function), but aren’t there will be all three values passed inside of POST request as empty strings?
Will try to apply some changes and test them next week, but maybe you will have a guess about issue.