price_source => { type => 'text' },
pricetype => { type => 'text' },
protocol => { type => 'text', default => 'http', not_null => 1 },
+ proxy => { type => 'text', default => '' },
realm => { type => 'text' },
server => { type => 'text' },
shipping_costs_parts_id => { type => 'integer' },
push @errors, $::locale->text('The path is missing.') unless $self->{path};
push @errors, $::locale->text('The Host Name is missing') unless $self->{server};
push @errors, $::locale->text('The Host Name seems invalid') unless $self->{server} =~ m/[0-9A-Za-z].\.[0-9A-Za-z]/;
+ push @errors, $::locale->text('The Proxy Name seems invalid') unless $self->{proxy} =~ m/[0-9A-Za-z].\.[0-9A-Za-z]/;
push @errors, $::locale->text('Orders to fetch neeeds a positive Integer')
unless $self->{orders_to_fetch} > 0;
my ($self) = @_;
my $client = REST::Client->new(host => $self->config->server);
+
+ $client->getUseragent()->proxy([$self->config->protocol], $self->config->proxy) if $self->config->proxy;
+
$client->addHeader('Content-Type', 'application/json');
$client->addHeader('charset', 'UTF-8');
$client->addHeader('Accept', 'application/json');
--- /dev/null
+-- @tag: shop_add_proxy
+-- @description: Shop-Config um Option Proxy erweitert
+-- @depends: shops_5
+-- @ignore: 0
+
+ALTER TABLE shops ADD COLUMN proxy TEXT default '';
<th align="right">[% 'Port' | $T8 %]</th>
<td>[%- L.input_tag("shop.port", SELF.shop.port, size=5) %]</td>
</tr>
+ <tr>
+ <th align="right">[% 'Proxy' | $T8 %]</th>
+ <td>[%- L.input_tag("shop.proxy", SELF.shop.proxy, size=size) %]</td>
+ </tr>
<tr>
<th align="right">[% 'Path' | $T8 %]</th>
<td>[%- L.input_tag("shop.path", SELF.shop.path, size=size) %]</td>