responseToDocument static method
Document?
responseToDocument(
- Response response
Takes an http.Response
and returns a html.Document
Implementation
static Document? responseToDocument(http.Response response) {
if (response.statusCode != 200) {
return null;
}
Document? document;
try {
document = parser.parse(utf8.decode(response.bodyBytes));
} catch (err) {
return document;
}
return document;
}