Compiles, but fails to POST the json request.

Needs a better coder to read the code and work out why stats.cpp:82
onwards fails.