Web Request - JSON not sendingSolved

Hey, so my code's web request isn't sending correctly as the JSON can't be read by the server.

            Dictionary<string, string> header = new Dictionary<string, string> { { "Authorization", "Bearer " + apiKey } };
            string bodyJson = Regex.Unescape("{ \"data\":[{ \"type\":\"identifier\",\"attributes\":{ \"type\":\"steamID\",\"identifier\":\"" + playerToKick.Id + "\"}}] }");

            Log(bodyJson);

            webrequest.Enqueue(apiCall + "/players/match", bodyJson, (code, res) => 
            {
                Log(code.ToString());
                Log(res);
            }, this, Core.Libraries.RequestMethod.POST, header, 200f);​

bump!

I would check on your server to see what the output is that it receives. You'd need to make sure the format is what it expects.

Go0ePa8S2poB3OZ.jpg Wulf

I would check on your server to see what the output is that it receives. You'd need to make sure the format is what it expects.

The output is correct as if I put it in Postman, it is successfully sent.

Does the server expect a specific application type set in the header?

Go0ePa8S2poB3OZ.jpg Wulf

Does the server expect a specific application type set in the header?

Yes, it does, fixed the issue! Thanks :)

Locked automatically