Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(86)

Side by Side Diff: sky/sdk/lib/framework/net/fetch.dart

Issue 1169253002: Fix typo in fetch.dart (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 import '../shell.dart' as shell; 5 import '../shell.dart' as shell;
6 import 'dart:async'; 6 import 'dart:async';
7 import 'dart:typed_data'; 7 import 'dart:typed_data';
8 import 'package:mojo/core.dart' as core; 8 import 'package:mojo/core.dart' as core;
9 import 'package:mojom/mojo/network_service.mojom.dart'; 9 import 'package:mojom/mojo/network_service.mojom.dart';
10 import 'package:mojom/mojo/url_loader.mojom.dart'; 10 import 'package:mojom/mojo/url_loader.mojom.dart';
(...skipping 26 matching lines...) Expand all
37 37
38 Future<UrlResponse> fetchUrl(String relativeUrl) async { 38 Future<UrlResponse> fetchUrl(String relativeUrl) async {
39 String url = Uri.base.resolve(relativeUrl).toString(); 39 String url = Uri.base.resolve(relativeUrl).toString();
40 UrlRequest request = new UrlRequest() 40 UrlRequest request = new UrlRequest()
41 ..url = url 41 ..url = url
42 ..autoFollowRedirects = true; 42 ..autoFollowRedirects = true;
43 return fetch(request); 43 return fetch(request);
44 } 44 }
45 45
46 Future<Response> fetchBody(String relativeUrl) async { 46 Future<Response> fetchBody(String relativeUrl) async {
47 UrlResponse response = await fetchMojo(relativeUrl); 47 UrlResponse response = await fetchUrl(relativeUrl);
48 if (response.body == null) return new Response(null); 48 if (response.body == null) return new Response(null);
49 49
50 ByteData data = await core.DataPipeDrainer.drainHandle(response.body); 50 ByteData data = await core.DataPipeDrainer.drainHandle(response.body);
51 return new Response(data); 51 return new Response(data);
52 } 52 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698