sub _parse_send_status_data {
my $self = shift;
my $json = shift;
if(defined $json){
my $d = $self->json_decode($json);
return {is_success => 0,status=>"数据格式错
$json = $self->http_post(gen_url($api,@query_string),("Content-Type"=>"application/json; charset=UTF-8"),Content=>$self->json_encode($post));
return unless defined $json;
my $d = $self->json_
decode($json);
return unless defined $d;
return if $d->{BaseResponse}{Ret}!=0;
return if $d->{Count}==0;
my %member_info;
my @member_key = qw(HeadImgUrl NickName PYInitial PYQuanP
;
}
my $reply;
my $data = {};
eval{
$data = $client->json_decode($res->content);
};
if($@){
print $@,"\n" if $client->{debug};
= shift;
print $response->content(),"\n" if $self->{debug};
my $d = $self->json_decode($response->content());
#return if $d->{BaseResponse}{Ret}!=0;
$self->_pars
t(
$url,
("Content-Type"=>"application/json; charset=UTF-8"),
Content=>$self->json_encode($post),
$callback
);
});
}
1;
json = $self->http_post(Weixin::Util::gen_url($api,@query_string),@headers,("Content-Type"=>"application/json; charset=UTF-8"),Content=>$self->json_encode($post));
my $d = $self->json_decode($json
my $json = $self->http_post(gen_url($api,@query_string),("Content-Type"=>"application/json; charset=UTF-8"),Content=>"{}");
return unless defined $json;
my $d = $self->json_decode($json);
$json = $self->http_post(gen_url($api,@query_string),("Content-Type"=>"application/json; charset=UTF-8"),Content=>$self->json_encode($post));
return unless defined $json;
my $d = $self->json_
decode($json);
return unless defined $d;
return if $d->{BaseResponse}{Ret}!=0;
my @member_key = qw(HeadImgUrl NickName PYInitial PYQuanPin Alias Province City Sex Id Uin Signature DisplayN
#status
);
}
}
};
my $post_data = $self->json_encode($post);
print "POST $url\n$post_data\n" if $self->{debug};;
$self->timer2(
$self->asyn_http_post(
$url,
("Content-Type"=>"application/json; charset=UTF-8"),
Content=>$post_data,
$callback,
);
p;
use JSON ();
sub now{
my $self = shift;
return int Time::HiRes::time() * 1000;
}
sub json_decode {
my $self = shift;
my $json = shift;
my $d;
eval{
$d = JSON->new->
>decode($json);
};
return $d;
}
sub json_encode {
my $self = shift;
my $d = shift;
my $json;
eval{
$json = JSON->new->utf8->encode($d);
};
return $json;
}
su