Browse Source

yamd - кодирование тела запроса в строку байт

master
Sergey Kiselev 6 years ago
parent
commit
1abfeacda1
  1. 4
      yamd

4
yamd

@ -36,6 +36,7 @@ use warnings;
our $VERSION = '0.1'; our $VERSION = '0.1';
use File::Basename; use File::Basename;
use Encode qw/encode/;
use YAML::XS qw/Load LoadFile/; use YAML::XS qw/Load LoadFile/;
use JSON::XS; use JSON::XS;
@ -267,7 +268,8 @@ if ( $task->{service} eq "domain" &&
my $request_content = "domain=" . $task->{domain}; my $request_content = "domain=" . $task->{domain};
foreach my $k (keys %{$task->{options}}) { foreach my $k (keys %{$task->{options}}) {
$request_content .= "&" . $k . "=" . $task->{options}->{$k}; $request_content .= "&" . $k . "=";
$request_content .= encode("utf8",$task->{options}->{$k});
} }
$request->content($request_content); $request->content($request_content);

Loading…
Cancel
Save