Artifactory-Client

 view release on metacpan or  search on metacpan

README.md  view on Meta::CPAN

## get( @args )

Invokes GET request on LWP::UserAgent-like object; params are passed through.

## post( @args )

nvokes POST request on LWP::UserAgent-like object; params are passed through.

## put( @args )

Invokes PUT request on LWP::UserAgent-like object; params are passed through.

## delete( @args )

Invokes DELETE request on LWP::UserAgent-like object; params are passed
through.

## request( @args )

Invokes request() on LWP::UserAgent-like object; params are passed through.

lib/Artifactory/Client.pm  view on Meta::CPAN


=cut

sub post {
    my ( $self, @args ) = @_;
    return $self->_request( 'post', @args );
}

=head2 put( @args )

Invokes PUT request on LWP::UserAgent-like object; params are passed through.

=cut

sub put {
    my ( $self, @args ) = @_;
    return $self->_request( 'put', @args );
}

=head2 delete( @args )

lib/Artifactory/Client.pm  view on Meta::CPAN

    my $file       = $args{file};
    my $header     = $args{header};

    $path = $self->_merge_repo_and_path($path);
    my @joiners = ( $self->_art_url() . "/$path" );
    my $props = $self->_attach_properties( properties => $properties, matrix => 1 );
    push @joiners, $props if ($props);    # if properties aren't passed in, the function returns empty string

    my $url = join( ";", @joiners );
    my $req = HTTP::Request::StreamingUpload->new(
        PUT     => $url,
        headers => HTTP::Headers->new( %{$header} ),
        ( $file ? ( fh => Path::Tiny::path($file)->openr_raw() ) : () ),
    );
    return $self->request($req);
}

=head2 deploy_artifact_by_checksum( path => $path, properties => { key => [ values ] }, file => $file, sha1 => $sha1 )

Takes path, properties, filename and sha1 then deploys the file.  Note that properties are a hashref with key-arrayref
pairs, such as:



( run in 0.424 second using v1.01-cache-2.11-cpan-4e96b696675 )