Skip to content

Commit

Permalink
now with put and delete helpers
Browse files Browse the repository at this point in the history
  • Loading branch information
trcjr committed Mar 26, 2011
1 parent a0f8029 commit f614773
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions lib/LWP/UserAgent.pm
Expand Up @@ -429,6 +429,22 @@ sub head {
} }




sub put {
require HTTP::Request::Common;
my($self, @parameters) = @_;
my @suff = $self->_process_colonic_headers(\@parameters, (ref($parameters[1]) ? 2 : 1));
return $self->request( HTTP::Request::Common::PUT( @parameters ), @suff );
}


sub delete {
require HTTP::Request::Common;
my($self, @parameters) = @_;
my @suff = $self->_process_colonic_headers(\@parameters,1);
return $self->request( HTTP::Request::Common::DELETE( @parameters ), @suff );
}


sub _process_colonic_headers { sub _process_colonic_headers {
# Process :content_cb / :content_file / :read_size_hint headers. # Process :content_cb / :content_file / :read_size_hint headers.
my($self, $args, $start_index) = @_; my($self, $args, $start_index) = @_;
Expand Down

0 comments on commit f614773

Please sign in to comment.