Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Altered HTTP::Lite library to support streaming uploading of files.
To upload a file use the following code: #Create http object my $http = new HTTP::Lite; #Set the content type $http->add_req_header('Content-Type', 'application/octet-stream'); #Set the request method $http->method('POST'); #Set the file that has to be uploaded $http->{'content'} = {'file' => <FILENAME>}; #Make the request $http->request(<URL>); This code will send a 'POST' request to <URL> and the file <FILENAME> will be streamed as the body of the request.
- Loading branch information