xml and json responses are treated in a different way from Guzzle