Skip to content

Commit

Permalink
Merge pull request hollie#763 from hplato/razberry
Browse files Browse the repository at this point in the history
Razberry
  • Loading branch information
hplato authored Aug 27, 2018
2 parents 7b8e5f2 + b05fb9f commit be0cd3b
Show file tree
Hide file tree
Showing 3 changed files with 595 additions and 292 deletions.
7 changes: 5 additions & 2 deletions bin/get_url
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ use Getopt::Long;
#print "get_url: @ARGV\n";
if (
!&GetOptions( \%parms, 'h', 'help', 'quiet', 'cookies=s', 'cookie_file_in=s', 'cookie_file_out=s', 'post=s', 'header=s', 'userid=s', 'password=s', 'ua',
'put=s', 'json', 'response_code' )
'put=s', 'timeout=s', 'json', 'response_code' )
or !@ARGV
or $parms{h}
or $parms{help}
Expand All @@ -32,7 +32,7 @@ if (
Usage:
$Pgm_Name [-quiet] [-cookies 'cookiestr'] [-post 'poststr'] [-header header_file] url [local_file]
$Pgm_Name [-quiet] [-cookies 'cookiestr'] [-post 'poststr'] [-header header_file] [-timeout X] url [local_file]
-quiet: no output on stdout
Expand All @@ -59,6 +59,7 @@ Usage:
-response_code: STDOUT only: Prepend output with RESPONSECODE: <response code>\n
-timeout: XX : number of seconds to wait for command to complete
If local_file is specified, data is stored there.
If local_file = /dev/null, data is not returned.
Expand Down Expand Up @@ -113,6 +114,8 @@ sub use_ua {
if $config_parms{proxy};

$ua->timeout(30); # Time out after 30 seconds
$ua->timeout($parms{timeout} ) if $parms{timeout};

$ua->env_proxy();
$ua->agent( $config_parms{get_url_ua} ) if $config_parms{get_url_ua};

Expand Down
Loading

0 comments on commit be0cd3b

Please sign in to comment.