Use the last-modified sent by the server

This commit is contained in:
Tobe O 2018-04-02 11:26:42 -04:00
parent 2a3ca0bd2b
commit 63e0d9d2f3

View file

@ -43,7 +43,7 @@ main() async {
client = await connectTo(app);
response1 = await client.get('/date.txt');
response2 = await client.get('/date.txt');
lastModified = new DateTime.now().toUtc();
lastModified = fmt.parse(response2.headers['last-modified']);
print('Response 1 status: ${response1.statusCode}');
print('Response 2 status: ${response2.statusCode}');
print('Response 1 body: ${response1.body}');