HTTP-Request-StreamingUpload
    
    
  
  
  
view release on metacpan or search on metacpan
---
abstract: 'streaming upload wrapper for HTTP::Request'
author:
  - 'Kazuhiro Osawa <yappo <at> shibuya <döt> pl>'
build_requires:
  ExtUtils::MakeMaker: 6.42
  Test::More: 0
  Test::Requires: 0
configure_requires:
  ExtUtils::MakeMaker: 6.42
distribution_type: module
generated_by: 'Module::Install version 0.910'
lib/HTTP/Request/StreamingUpload.pm view on Meta::CPAN
    $content;
}
1;
__END__
=for stopwords filepath callback chunked HeaderName HeaderValue fh
=head1 NAME
HTTP::Request::StreamingUpload - streaming upload wrapper for HTTP::Request
=head1 SYNOPSIS
=head2 upload from filepath
  my $req = HTTP::Request::StreamingUpload->new(
      PUT     => 'http://example.com/foo.cgi',
      path    => '/your/upload.jpg',
      headers => HTTP::Headers->new(
          'Content-Type'   => 'image/jpeg',
lib/HTTP/Request/StreamingUpload.pm view on Meta::CPAN
      callback => sub { shift @chunk },
      headers => HTTP::Headers->new(
          'Content-Type'   => 'text/plain',
          'Content-Length' => 9,
      ),
  );
  my $res = LWP::UserAgent->new->request($req);
=head1 DESCRIPTION
HTTP::Request::StreamingUpload is streaming upload wrapper for L<HTTP::Request>.
It could be alike when $DYNAMIC_FILE_UPLOAD of L<HTTP::Request::Common> was used.
However, it is works only for POST method with form-data.
HTTP::Request::StreamingUpload works on the all HTTP methods.
Of course, you can big file upload using few memory by this wrapper.
=head1 HTTP::Request::StreamingUpload->new( $method, $uir, %args );
=head2 %args Options
( run in 0.850 second using v1.01-cache-2.11-cpan-5dc5da66d9d )