Allow headers to be deleted

This commit is contained in:
Chris 2024-03-18 12:12:07 +00:00
parent 353d2412c2
commit 61e09ca077

View File

@ -194,6 +194,23 @@ sub addHeader {
return; return;
} }
=head3 deleteHeader ( $header_name )
Remove a custom header from requests made by this client.
=cut
sub deleteHeader {
my $self = shift;
my $header = shift;
my $headers = $self->{'_headers'} || {};
delete $headers->{$header} if(exists($headers->{$header}));
$self->{'_headers'} = $headers;
return;
}
=head3 buildQuery ( [...] ) =head3 buildQuery ( [...] )
A convienience wrapper around URI::query_form for building query strings from a A convienience wrapper around URI::query_form for building query strings from a