Permalink
Browse files

getinfo.p6 examples works moritz++, jnthn++

  • Loading branch information...
1 parent be1f5e5 commit fa4b546847d61b7ff3c0d7e8a144a7c05ae076d8 @azawawi committed Nov 17, 2012
Showing with 2 additions and 4 deletions.
  1. +2 −4 examples/getinfo.p6
View
@@ -16,14 +16,12 @@ my $res = curl_easy_perform($curl);
if CURLE_OK == $res {
# ask for the content-type
- my $ct = CArray[int].new;
- my $length = 20;
- $ct[$_] = 0 for 0..$length - 1;
+ my $ct = CArray[Str].new;
+ $ct[0] = '';
$res = curl_easy_getinfo($curl, CURLINFO_CONTENT_TYPE, $ct);
if (CURLE_OK == $res) && $ct {
printf("We received Content-Type: %s\n", $ct[0]);
- say "\$ct[$_] = {$ct[$_]}" for 0..$length - 1;
}
# always cleanup

0 comments on commit fa4b546

Please sign in to comment.