Fetches the specified url
from HTTP.
If headers
is specified, the headers will be added onto the request.
Source
static Future<String> fetchUrl(String url, {Map<String, String> headers}) async { var request = await createRequest("GET", url, headers: headers); var response = await request.close(); return const Utf8Decoder().convert(await readBytesFromResponse(response)); }