Open SteWootten opened 9 years ago
When attempting to retrieve xml from the response a SAXParseException is thrown with Message: Content is not allowed in prolog.
SAXParseException
Message: Content is not allowed in prolog.
def restBuilder = new RestBuilder() def response = restBuilder.get("http://grails.org/api/v1.0/plugin/acegi/") print response.xml
Works fine if I do
print response.json
Also doing
def response = restBuilder.get("http://api.openweathermap.org/data/2.5/weather?q=London&mode=xml") print response.xml
just prints the String GB, which is the only text inside tags in the xml response. Furthermore
def response = restBuilder.get("http://api.openweathermap.org/data/2.5/forecast/daily?q=London&mode=xml&units=metric&cnt=1") print response.xml
prints out LondonGB0.044, which is all the text inside tags within the xml response.
Any thoughts as to what is going on?
When attempting to retrieve xml from the response a
SAXParseException
is thrown withMessage: Content is not allowed in prolog.
Works fine if I do
Also doing
just prints the String GB, which is the only text inside tags in the xml response. Furthermore
prints out LondonGB0.044, which is all the text inside tags within the xml response.
Any thoughts as to what is going on?