;
my $json = $self->http_post($self->gen_url($api,@query_string),{json=>1,Referer=>'https://' . $self->domain . '/'},json=>$post);
return if not defined $json;
return if $json->{BaseResp
以在http header设置一些请求相关的选项,比如:
#json=>1 表示将响应的json数据进行json decode得到perl的hash引用
#ua_retry_times=>3 表示请求
时间
#ua_inactivity_timeout 阻塞http请求idle 超时时间
my $json_decode_hash = $client->http_get($url,{json=>1,retry_times=>3,Host=>"www.qq.com"});
#http post请求
$client->
post_event => 1,
});
#接收到消息后,插件会通过HTTP POST请求的方式将json格式的消息上报到http://127.0.0.1:4000/post_api
普通好友消息或群消息上报