perl lwp 响应信息
来源:互联网 发布:在手机淘宝怎么卖东西 编辑:程序博客网 时间:2024/05/16 07:34
[root@dr-mysql01 ~]# cat hcp.pl use LWP::UserAgent; $ua = LWP::UserAgent->new; @header = ( 'accept'=> "application/json", 'content-type'=> "application/json", 'apix-key'=> "e7b00871640c49567a37566ccd5c27e9", 'User-Agent' => "Mozilla/8.0" );$start = $ARGV[0];$end = $ARGV[1];$date = $ARGV[2];$host="http://a.apix.cn/apixlife/ticket/rest?from=$start&to=$end&date=$date";$request = HTTP::Request->new(GET=>"$host");$request->header(@header);$response = $ua->request($request); $content= $response->decoded_content;$content =~ s/\\u([0-9a-fA-F]{4})/pack("U",,hex($1))/eg; print "\$content is $content\n";[root@dr-mysql01 ~]# set -o vi[root@dr-mysql01 ~]# ^Crl zabbix.pl a[root@dr-mysql01 ~]# perl hcp.pl BJP TJP 2015-12-11$content is <h1>403 Forbidden</h1>[root@dr-mysql01 ~]# perl hcp.pl BJP TJP 2015-12-11$content is <h1>403 Forbidden</h1>[root@dr-mysql01 ~]# perl hcp.pl BJP TJP 2015-12-11$content is <h1>403 Forbidden</h1>[root@dr-mysql01 ~]# perl hcp.pl BJP TJP 2015-12-11Wide character in print at hcp.pl line 20.$content is {"status": true, "validateMessagesShowId": "_validatorMessage", "messages": [], "httpstatus": 200, "validateMessages": {}, "data": {"message": "没有符合条件的数据!", "flag": false}}[root@dr-mysql01 ~]# vim hcp.pl You have new mail in /var/spool/mail/root[root@dr-mysql01 ~]# perl hcp.pl BJP TJP 2015-12-11$content is { "error": "Key not authorised"}
0 0
- perl lwp 响应信息
- Perl&LWP
- Perl & LWP
- PERL LWP
- perl LWP 网络编程
- perl --- LWP::UserAgent
- perl and LWP 文档
- perl and LWP 文档
- perl&lwp经典用法
- perl&LWP 综述
- perl之LWP
- Perl LWP&HTTP
- PERL - LWP::SIMPLE 使用
- perl-lwp笔记
- Perl-LWP文档
- Perl LWP模块
- perl lwp 超时问题
- perl lwp编码
- 给众多IT行业开发者的一个建议,要注意避开黑心的培训机构
- Android动画
- 如果flip,y方向的offset不能太大
- 对java List中的对象进行排序
- Android Studio很实用的调试技巧
- perl lwp 响应信息
- SNMP 原理与实战详解
- RecyclerView , IllegalStateException: Cannot call this method while RecyclerView is computing a layo
- MagicalRecord操作CoreData小示例
- 视频编码名词参数解释
- 学习Android从0开始之开发工具篇-Android studio详解
- 挤死collideWith: function(other, axis) { if (other.touches(this)) { other.kill(); } }
- 主程序访问线程的临时变量
- Android Studio导入eclipse项目