JSON reads a http response into a data container using a json decoder.
The response is checked for its status code and the http.Response.Body is closed.
XML reads a http response into a data container using an XML decoder.
The response is checked for its status code and the http.Response.Body is closed.