Group
Extension

Matches 1

PDK ( C/CA/CARELINE/PDK-0.014.tar.gz, CARELINE, 2024; MetaCPAN )
PDK/lib/PDK/Utils/UserAgent.pm ( view source; MetaCPAN )
ERL UA");

  # 请求链接并根据响应值做出相关动作
  # my $tx = $ua->get($url => json => $json);
  my $tx = $ua->get($url);
  if (my $err = $tx->error) {
    if ($err->{code}) {
      ret
 500, message => "Connection error: $err->{message}"};
    }
  }
  else {
    return $tx->result->json;
  }
}

#------------------------------------------------------------------------------
# 设定
#------------------------------------------------------------------------------
sub postJson {
  my ($url, $json) = @_;

  # 初始化并设定 UA 相关属性
  my $ua = Mojo::UserAgent->new(max_redi

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.