Add postJSON and postJSONWithBody functions