Search
 
SCRIPT & CODE EXAMPLE
 

PERL

perl mechanize check mirror response for errors

my $response = $mech->mirror($abs_url, $filename)->message;
            print Dumper($response); #print response: [OK, Not Found, Not Modified]
            if($response eq 'Not Found'){
                #responds code here to error trying to download.
            }
            if($response eq 'Not Modified'){
                #responds code here to unmodified download.
            }
            if($response eq 'OK'){
                #responds code here to download successfully.
            }
Comment

PREVIOUS NEXT
Code Example
Perl :: perl 6 
Perl :: perl mechanize infinite scroll with attempt count 
Perl :: Perl (perl 2018.12) sample 
Pascal :: pascal input number 
Pascal :: subrange variables pascal 
Pascal :: pascal while 
Pascal :: does not equal in pascal 
Powershell :: powershell take ownership recursive command 
Powershell :: powershell get my documents folder 
Gdscript :: godot ignore function 
Clojure :: Clojure defn 
Abap :: what is the interface between the abap dictionary and the underlying database management system 
Assembly :: array month name 
Assembly :: error: failed to synchronize all the database archlinux 
Assembly :: creating a sparse-file with dd 
Assembly :: enter 64 bit mode 
Javascript :: jquery vslidation remove spaces from input 
Javascript :: map range of numbers to another range 
Javascript :: jest cache clear 
Javascript :: javascript replace spaces with dashes 
Javascript :: import redux thunk 
Javascript :: jquery refresh page 
Javascript :: delete session javascript 
Javascript :: get week day name in javascript 
Javascript :: how to remove checked attribute of checkbox in jquery 
Javascript :: loop array backwards javascript 
Javascript :: generate random whole numbers within a range javascript 
Javascript :: jquery remove and add class 
Javascript :: how to use another port in angular 
Javascript :: How to get current URL with Javascript or React 
ADD CONTENT
Topic
Content
Source link
Name
6+6 =