I've been using Mathematica to progress through the problems of codeabbey.com, and I've picked up the first of "interactive" problems (Problem #176 - Say 100), which is sort of an introductory problem to communicating with a server via POST requests, a completely new topic to me.
I am supposed to make a POST to request to the problem ("game") server with the supplied token and I should get back a response with a random number up to 100.
So, I try with the following request
requestWithToken = HTTPRequest[ "http://codeabbey-games.atwebpages.com/say-100.php", <| Method -> "POST", CharacterEncoding -> "ASCII", "Body" -> "token: <my_personal_token_goes_here>"|>] requestWithToken["Body"]
and I get back a request object with a 200 status code, which means I have successfully communicated with the server, and a text response that says
error: Content-type (text/plain;charset=utf-8) do not match data
What am I to make of this response? That the server expects utf-8 or that it expects plain text and I'm sending utf-8? Whatever I've tried at CharacterEncoding (e.g, None, "ANSI", "UTF-8") doesn't alter the response I get. So, can anyone help me make sense of the response and form a correct request?