diff options
author | Daniel Friesel <derf@finalrewind.org> | 2020-09-06 11:15:19 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2020-09-06 11:15:19 +0200 |
commit | b2824fcfb9ef1fcd9b09d74c472aa783d6fe0db5 (patch) | |
tree | 06581073223bab6577987be420478c9393f35fb5 /lib/DBInfoscreen/Helper/HAFAS.pm | |
parent | 9bdae29a17e9342eb85db11d97935789492e7dc7 (diff) |
add wagonorder helper
Diffstat (limited to 'lib/DBInfoscreen/Helper/HAFAS.pm')
-rw-r--r-- | lib/DBInfoscreen/Helper/HAFAS.pm | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/DBInfoscreen/Helper/HAFAS.pm b/lib/DBInfoscreen/Helper/HAFAS.pm index 18a3eda..c9a2ba2 100644 --- a/lib/DBInfoscreen/Helper/HAFAS.pm +++ b/lib/DBInfoscreen/Helper/HAFAS.pm @@ -29,9 +29,11 @@ sub hafas_rest_req { return $content; } - my $res = eval { $self->{user_agent}->get($url)->result; }; + my $res + = eval { $self->{user_agent}->get( $url => $self->{header} )->result; }; if ($@) { + $self->{log}->debug("hafas_rest_req($url): $@"); return; } if ( $res->is_error ) { @@ -52,9 +54,11 @@ sub hafas_json_req { return $content; } - my $res = eval { $self->{user_agent}->get($url)->result }; + my $res + = eval { $self->{user_agent}->get( $url => $self->{header} )->result }; if ($@) { + $self->{log}->debug("hafas_json_req($url): $@"); return; } if ( $res->is_error ) { @@ -82,9 +86,11 @@ sub hafas_xml_req { return $content; } - my $res = eval { $self->{user_agent}->get($url)->result }; + my $res + = eval { $self->{user_agent}->get( $url => $self->{header} )->result }; if ($@) { + $self->{log}->debug("hafas_xml_req($url): $@"); return; } if ( $res->is_error ) { |