### ----------------------------------------------------
### -- LibCurl
### -- Licenses: NASA-1.3
### -- Authors: Curt Tilmes <Curt.Tilmes@nasa.gov>
### -- File: eg/debug.raku
### ----------------------------------------------------
#!/usr/bin/env raku
use LibCurl::Easy;

sub dump(LibCurl::Easy $easy, $type, Buf $buf)
{
    my $str = $buf.decode;  # Only do this if you know the data are ok for it!

    say "$type - $str";

    return 0;
}

my $curl = LibCurl::Easy.new(URL => 'http://example.com/',
                             debugfunction => &dump).perform;

say $curl.statusline;


