Hi. I am tring to setup a basic HTTP connection between my game and localhost. The connection is working fine. But, I am receiving null at the database.
I have been trying to setup a way to get some gameplay stats to a server(for analysis), but I’ve been running into similar issues as well. The request does reach my localhost, but not the data. My database has a bunch of rows with just the default value, and not the value I want to send. Also, I have a similar code, but I’m accessing it through blueprints. I need help!
Hi abhishek17, would be great to have a little more info on that.
What is the exact string of CurrentRequest.TheData?
Also, could you please print what is arriving at your PHP script by printing all POST variables using print_r($_POST); in PHP.
I see that your are trying to transfer your data as Content-Tyoe application/json, but you are formatting your data as Content-Type application/x-www-form-urlencoded
I’m not super experienced in this, but it looks like you set your Content-Type to application/json format, but you’re sending the actual content in the format of application/x-www-form-urlencoded
I’m assuming your latest comment was suppose to be a reply to this one. You may have misread my answer. I was saying that your header is already set to application/json, but you’re sending your content in a different format (x-www-form-urlencoded). Change your content to be written in JSON format and it may work.