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

Issue 99333012: The first few short pkg:http examples (Closed)

Created:
7 years ago by shailentuli
Modified:
7 years ago
Base URL:
https://github.com/dart-lang/cookbook.git@master
Visibility:
Public.

Description

The first few short pkg:http examples R=ajohnsen@google.com Committed: e99fc67

Patch Set 1 #

Total comments: 18

Messages

Total messages: 7 (0 generated)
shailentuli
The first installment of short examples showing use of pkg:http. More to come, and the ...
7 years ago (2013-12-06 11:19:01 UTC) #1
shailentuli
Adding Soren. You both don't need to look at this I expect (whoever has time). ...
7 years ago (2013-12-06 11:40:14 UTC) #2
Anders Johnsen
LGTM, nice examples :) https://chromiumcodereview.appspot.com/99333012/diff/1/recipes/dart_io/pkg_http/bin/getting_response_content_in_binary_format.dart File recipes/dart_io/pkg_http/bin/getting_response_content_in_binary_format.dart (right): https://chromiumcodereview.appspot.com/99333012/diff/1/recipes/dart_io/pkg_http/bin/getting_response_content_in_binary_format.dart#newcode7 recipes/dart_io/pkg_http/bin/getting_response_content_in_binary_format.dart:7: var bytes = response.bodyBytes; var ...
7 years ago (2013-12-06 11:53:27 UTC) #3
shailentuli
Committed patchset #1 manually as re99fc67 (presubmit successful).
7 years ago (2013-12-06 18:00:17 UTC) #4
shailentuli
https://chromiumcodereview.appspot.com/99333012/diff/1/recipes/dart_io/pkg_http/bin/getting_response_content_in_binary_format.dart File recipes/dart_io/pkg_http/bin/getting_response_content_in_binary_format.dart (right): https://chromiumcodereview.appspot.com/99333012/diff/1/recipes/dart_io/pkg_http/bin/getting_response_content_in_binary_format.dart#newcode7 recipes/dart_io/pkg_http/bin/getting_response_content_in_binary_format.dart:7: var bytes = response.bodyBytes; On 2013/12/06 11:53:28, Anders Johnsen ...
7 years ago (2013-12-06 18:16:29 UTC) #5
Søren Gjesse
lgtm, with a few comments/suggestions https://chromiumcodereview.appspot.com/99333012/diff/1/recipes/dart_io/pkg_http/bin/adding_custom_headers.dart File recipes/dart_io/pkg_http/bin/adding_custom_headers.dart (right): https://chromiumcodereview.appspot.com/99333012/diff/1/recipes/dart_io/pkg_http/bin/adding_custom_headers.dart#newcode6 recipes/dart_io/pkg_http/bin/adding_custom_headers.dart:6: http.get(url, headers : {'User-Agent': ...
7 years ago (2013-12-09 08:30:46 UTC) #6
shailentuli
7 years ago (2013-12-11 04:07:51 UTC) #7
Message was sent while issue was closed.
https://chromiumcodereview.appspot.com/99333012/diff/1/recipes/dart_io/pkg_ht...
File recipes/dart_io/pkg_http/bin/adding_custom_headers.dart (right):

https://chromiumcodereview.appspot.com/99333012/diff/1/recipes/dart_io/pkg_ht...
recipes/dart_io/pkg_http/bin/adding_custom_headers.dart:6: http.get(url, headers
: {'User-Agent': 'request'}).then((response) {
On 2013/12/09 08:30:47, Søren Gjesse wrote:
> Shouldn't we put something like 'Dart/1.0 (My Dart client)' in the User-Agent
> header? Or chose another header?

Done.

https://chromiumcodereview.appspot.com/99333012/diff/1/recipes/dart_io/pkg_ht...
recipes/dart_io/pkg_http/bin/adding_custom_headers.dart:9:
print("${repo['name']}, "
On 2013/12/09 08:30:47, Søren Gjesse wrote:
> Maybe add some label text as well, e.g. "Repository: ${repo['name']}: " ...

Added a little header explaining the categories.

https://chromiumcodereview.appspot.com/99333012/diff/1/recipes/dart_io/pkg_ht...
File recipes/dart_io/pkg_http/bin/getting_the_response_headers.dart (right):

https://chromiumcodereview.appspot.com/99333012/diff/1/recipes/dart_io/pkg_ht...
recipes/dart_io/pkg_http/bin/getting_the_response_headers.dart:9:
print(response.headers['access-control-allow-origin']);
On 2013/12/09 08:30:47, Søren Gjesse wrote:
> Additional label text?
> 
> print("Access-Control-Allow-Origin:
> ${response.headers['access-control-allow-origin']}");

Added additional label text

Powered by Google App Engine
This is Rietveld 408576698