The task here is to format properly the json requests expected by the server, and deal with any eventual error.