分享牛系列,分享牛专栏,分享牛。在项目开发中,http请求方式是最常见的了。怎么模拟http请求呢?方法有很多种,可以使用httpclient直接模拟请求,也可以使用火狐post插件方式,这个章节主要讲解火狐post插件使用。

首先下载火狐浏览器,直接在下载,附加组件中添加poster即可,附加之后效果如下所示:

点击打开即可。看到这个图片表示安装成功了。

下面开始操作:

1.1. get

get方式比较简单,直接在请求中添加?&之类的参数即可。

比如http://127.0.0.1:8080/matrix-deploy/groupuser/get_studio_user_list2?gid=590594

直接在请求中选择get方式即可,或者在参数中添加如下所示:

返回的格式如下:

{
    "apistatus": 1,
    "result": {
        "total": 15,
        "liveStatus": false,
        "onmic": [],
        "users": [
            {
                "birthday": "2013-01-01",
                "nickname": "陈陈陈陈_",
                "user_type": 1,
                "subtag_info": {
                    "subtag_name": "房主",
                    "subtag_gid": 0,
                    "can_show": true
                },
                "avatar": "18130909",
                "id": "109084",
                "jointime": "Wed Jun 08 11:44:33 +0800 2016",
                "description": "",
                "onAir": 0,
                "groupuser_props": {
                    "show_mark": true,
                    "remind": "UnDisturb"
                },
                "activetime": "Wed Jun 08 11:44:33 +0800 2016",
                "gender": "f",
                "role": 4,
                "isGag": false
            },
            {
                "birthday": "1985-01-01",
                "nickname": "爱扶老奶奶的蜀黍",
                "user_type": 1,
                "subtag_info": {
                    "subtag_name": "管理员",
                    "subtag_gid": 0,
                    "can_show": false
                },
                "avatar": "88451951",
                "id": "42750",
                "jointime": "Wed Jun 08 11:49:49 +0800 2016",
                "description": "当芳芳遇到阿德丽娜",
                "onAir": 0,
                "groupuser_props": {
                    "show_mark": true,
                    "remind": "UnDisturb"
                },
                "activetime": "Wed Jun 08 19:11:21 +0800 2016",
                "gender": "m",
                "role": 3,
                "isGag": false
            },
            {
                "id": "10121",
                "birthday": "1990-05-31",
                "jointime": "Wed Jun 08 14:23:05 +0800 2016",
                "user_type": 1,
                "nickname": "NEXI",
                "onAir": 0,
                "groupuser_props": {
                    "show_mark": true,
                    "remind": "UnDisturb"
                },
                "activetime": "Wed Jun 08 14:23:05 +0800 2016",
                "subtag_info": {
                    "subtag_name": "管理员",
                    "subtag_gid": 0,
                    "can_show": false
                },
                "role": 3,
                "gender": "m",
                "avatar": "97547862",
                "isGag": false
            },
            {
                "id": "40505",
                "jointime": "Wed Jun 08 18:27:23 +0800 2016",
                "user_type": 1,
                "nickname": "�",
                "onAir": 0,
                "groupuser_props": {
                    "show_mark": true,
                    "remind": "UnDisturb"
                },
                "activetime": "Wed Jun 08 18:27:23 +0800 2016",
                "subtag_info": {
                    "subtag_name": "管理员",
                    "subtag_gid": 0,
                    "can_show": false
                },
                "role": 3,
                "gender": "m",
                "avatar": "89053902",
                "isGag": false
            },
            {
                "id": "40452",
                "birthday": "1990-01-01",
                "jointime": "Wed Jun 08 16:41:24 +0800 2016",
                "user_type": 1,
                "nickname": "Ddddd",
                "onAir": 0,
                "groupuser_props": {
                    "show_mark": true,
                    "remind": "UnDisturb"
                },
                "activetime": "Wed Jun 08 16:41:24 +0800 2016",
                "subtag_info": {
                    "subtag_name": "未分组",
                    "subtag_gid": 0,
                    "can_show": false
                },
                "role": 1,
                "gender": "f",
                "avatar": "89657268",
                "isGag": false
            },
            {
                "birthday": "1985-01-01",
                "nickname": "自我喔喔喔喔喔喔喔喔喔喔自我喔",
                "user_type": 1,
                "subtag_info": {
                    "subtag_name": "未分组",
                    "subtag_gid": 0,
                    "can_show": false
                },
                "avatar": "88792220",
                "id": "381531",
                "jointime": "Wed Jun 08 18:58:38 +0800 2016",
                "description": "",
                "onAir": 0,
                "groupuser_props": {
                    "show_mark": true,
                    "remind": "UnDisturb"
                },
                "activetime": "Wed Jun 08 18:58:38 +0800 2016",
                "gender": "f",
                "role": 1,
                "isGag": false
            },
            {
                "id": "40561",
                "jointime": "Wed Jun 08 18:59:29 +0800 2016",
                "user_type": 1,
                "nickname": "少吃一口舒服一宿",
                "description": "",
                "onAir": 0,
                "groupuser_props": {
                    "show_mark": true,
                    "remind": "UnDisturb"
                },
                "activetime": "Wed Jun 08 19:08:56 +0800 2016",
                "subtag_info": {
                    "subtag_name": "未分组",
                    "subtag_gid": 0,
                    "can_show": false
                },
                "role": 1,
                "gender": "m",
                "avatar": "90023585",
                "isGag": false
            },
            {
                "id": "41340",
                "birthday": "1992-01-01",
                "jointime": "Wed Jun 08 14:36:01 +0800 2016",
                "user_type": 1,
                "nickname": "吉吉小王",
                "onAir": 0,
                "groupuser_props": {
                    "show_mark": true,
                    "remind": "UnDisturb"
                },
                "activetime": "Wed Jun 08 14:36:01 +0800 2016",
                "subtag_info": {
                    "subtag_name": "未分组",
                    "subtag_gid": 0,
                    "can_show": false
                },
                "role": 1,
                "gender": "f",
                "avatar": "89984476",
                "isGag": false
            },
            {
                "birthday": "1985-01-01",
                "nickname": "v",
                "user_type": 1,
                "subtag_info": {
                    "subtag_name": "未分组",
                    "subtag_gid": 0,
                    "can_show": false
                },
                "avatar": "88970314",
                "id": "396861",
                "jointime": "Wed Jun 08 15:38:13 +0800 2016",
                "description": "",
                "onAir": 0,
                "groupuser_props": {
                    "show_mark": true,
                    "remind": "UnDisturb"
                },
                "activetime": "Wed Jun 08 19:09:34 +0800 2016",
                "gender": "m",
                "role": 1,
                "isGag": false
            },
            {
                "id": "381317",
                "birthday": "1969-01-01",
                "jointime": "Wed Jun 08 18:45:15 +0800 2016",
                "user_type": 1,
                "nickname": "2goz",
                "onAir": 0,
                "groupuser_props": {
                    "show_mark": true,
                    "remind": "UnDisturb"
                },
                "activetime": "Wed Jun 08 19:05:46 +0800 2016",
                "subtag_info": {
                    "subtag_name": "未分组",
                    "subtag_gid": 0,
                    "can_show": false
                },
                "role": 1,
                "gender": "m",
                "avatar": "89985176",
                "isGag": false
            },
            {
                "id": "42459",
                "jointime": "Wed Jun 08 19:21:20 +0800 2016",
                "user_type": 1,
                "nickname": "疯子",
                "description": "",
                "onAir": 0,
                "groupuser_props": {
                    "show_mark": true,
                    "remind": "UnDisturb"
                },
                "activetime": "Wed Jun 08 19:21:20 +0800 2016",
                "subtag_info": {
                    "subtag_name": "未分组",
                    "subtag_gid": 0,
                    "can_show": false
                },
                "role": 1,
                "gender": "m",
                "avatar": "89474976",
                "isGag": false
            },
            {
                "id": "41436",
                "jointime": "Wed Jun 08 19:10:25 +0800 2016",
                "user_type": 1,
                "nickname": "11",
                "onAir": 0,
                "groupuser_props": {
                    "show_mark": true,
                    "remind": "UnDisturb"
                },
                "activetime": "Wed Jun 08 19:10:25 +0800 2016",
                "subtag_info": {
                    "subtag_name": "未分组",
                    "subtag_gid": 0,
                    "can_show": false
                },
                "role": 1,
                "gender": "f",
                "isGag": false
            },
            {
                "birthday": "2006-04-05",
                "nickname": "冀正",
                "user_type": 1,
                "subtag_info": {
                    "subtag_name": "未分组",
                    "subtag_gid": 0,
                    "can_show": false
                },
                "avatar": "89985536",
                "id": "398402",
                "jointime": "Wed Jun 08 13:27:52 +0800 2016",
                "description": "",
                "onAir": 0,
                "groupuser_props": {
                    "isFocus": 2,
                    "gag": false,
                    "show_mark": true,
                    "attention": true,
                    "remind": "UnDisturb"
                },
                "activetime": "Wed Jun 08 13:27:52 +0800 2016",
                "gender": "m",
                "role": 1,
                "isGag": false
            },
            {
                "id": "41707",
                "jointime": "Wed Jun 08 18:46:37 +0800 2016",
                "user_type": 1,
                "nickname": "8块腹肌",
                "description": "",
                "onAir": 0,
                "groupuser_props": {
                    "show_mark": true,
                    "remind": "UnDisturb"
                },
                "activetime": "Wed Jun 08 18:46:37 +0800 2016",
                "subtag_info": {
                    "subtag_name": "未分组",
                    "subtag_gid": 0,
                    "can_show": false
                },
                "role": 1,
                "gender": "m",
                "avatar": "90023308",
                "isGag": false
            },
            {
                "id": "41506",
                "jointime": "Wed Jun 08 15:37:06 +0800 2016",
                "user_type": 1,
                "nickname": "嘉熙",
                "onAir": 0,
                "groupuser_props": {
                    "show_mark": true,
                    "remind": "UnDisturb"
                },
                "activetime": "Wed Jun 08 15:37:06 +0800 2016",
                "subtag_info": {
                    "subtag_name": "未分组",
                    "subtag_gid": 0,
                    "can_show": false
                },
                "role": 1,
                "gender": "m",
                "isGag": false
            },
            {
                "id": "42624",
                "birthday": "1990-01-01",
                "jointime": "Wed Jun 08 14:26:10 +0800 2016",
                "user_type": 1,
                "nickname": "吉吉大王",
                "onAir": 0,
                "groupuser_props": {
                    "show_mark": true,
                    "remind": "UnDisturb"
                },
                "activetime": "Wed Jun 08 14:26:10 +0800 2016",
                "subtag_info": {
                    "subtag_name": "未分组",
                    "subtag_gid": 0,
                    "can_show": false
                },
                "role": 1,
                "gender": "f",
                "avatar": "90019043",
                "isGag": false
            }
        ],
        "queues": []
    }
}

1.2. post方式

post方式比较费时,我们在选择的时候选择post方式。

注意Content-Type一定要选择对,否则会不正确的。

具体值得传递跟get一样?gid=590594

具体如下所示:

1.3. header添加

很多请求的时候,可能涉及到回话或者其他的东西,需要header支持,在这里就必须要使用添加header方式了,

具体的添加如下:

post插件的更多相关文章

  1. Angular杂谈系列1-如何在Angular2中使用jQuery及其插件

    jQuery,让我们对dom的操作更加便捷.由于其易用性和可扩展性,jQuer也迅速风靡全球,各种插件也是目不暇接. 我相信很多人并不能直接远离jQuery去做前端,因为它太好用了,我们以前做的东西大 ...

  2. Jenkins 安装的HTML Publisher Plugin 插件无法展示ant生成的JunitReport报告

    最近在做基于jenkins ant  junit 的测试持续集成,单独ant junit生成的junitreport报告打开正常,使用Jenkins的HTML Publisher Plugin 插件无 ...

  3. 常用 Gulp 插件汇总 —— 基于 Gulp 的前端集成解决方案(三)

    前两篇文章讨论了 Gulp 的安装部署及基本概念,借助于 Gulp 强大的 插件生态 可以完成很多常见的和不常见的任务.本文主要汇总常用的 Gulp 插件及其基本使用,需要读者对 Gulp 有一个基本 ...

  4. solr服务中集成IKAnalyzer中文分词器、集成dataimportHandler插件

    昨天已经在Tomcat容器中成功的部署了solr全文检索引擎系统的服务:今天来分享一下solr服务在海量数据的网站中是如何实现数据的检索. 在solr服务中集成IKAnalyzer中文分词器的步骤: ...

  5. 使用Visual Studio SDK制作GLSL词法着色插件

    使用Visual Studio SDK制作GLSL词法着色插件 我们在Visual Studio上开发OpenGL ES项目时,避免不了写Shader.这时在vs里直接编辑shader就会显得很方便. ...

  6. 工欲善其事,必先利其器 之 VS2013全攻略(安装,技巧,快捷键,插件)!

    如有需要WPF工具的朋友可以移步 工欲善其事,必先利其器 之 WPF篇: 随着开发轨迹来看高效WPF开发的工具和技巧 之前一篇<c++的性能, c#的产能?!鱼和熊掌可以兼得,.NET NATI ...

  7. Jquery mobiscroll 移动设备(手机)wap日期时间选择插件以及滑动、滚动插件

    Jquery Mobiscroll是一个用于触摸设备(Android phones, iPhone, iPad, Galaxy Tab)的日期和时间选择器jQuery插件.以及各种滑动插件 可以让用户 ...

  8. 10个最好用的HTML/CSS 工具、插件和资料库

    大家在使用HTML/CSS开发项目的过程中,有使用过哪些工具,插件和库?下面介绍的10种HTML/CSS工具,插件和资料库,是国外程序员经常用到的. Firebug Lite FirebugLite ...

  9. 在Sublime Text 3上安装代码格式化插件CodeFormatter

    1.了解CodeFormatter插件 在Sublime Text 3中编写代码,为了能让我们的代码格式变得漂亮整洁,需要一个能自动格式代码的插件.这里发现CodeFormatter插件不错,它能支持 ...

  10. 【解决方案】Myeclipse 10 安装 GIT 插件 集成 步骤 图解

    工程开发中,往往要使用到集成GIT ,那么下面说说插件安装步骤 PS:以Myeclipse 10 为例,讲解集成安装步骤. ----------------------main------------ ...

随机推荐

  1. Xshell实现Windows上传文件到Linux主机

    我是怎么操作的: 1.打开一台本地Linux虚拟机,使用mount 挂载Windows的共享文件夹到Linux上,然后拷贝数据到Linux虚拟机里面:(经常第一步都不顺利,无法挂载Windows的文件 ...

  2. JavaScript 字典(Dictionary)

    TypeScript方式实现源码 //  set(key,value):向字典中添加新元素. //  remove(key):通过使用键值来从字典中移除键值对应的数据值. //  has(key ...

  3. String类中常用的方法(重要)

    1.字符串与字节 public String(byte[] byte); 将全部字节变成字符串 public String (byte[] byte,int offset,int length) 将部 ...

  4. 部署上次的Hapi到Windows+Docker,WindowsDocker

    前言: 理论的就不多说了,具体的架构看图.web这里是上篇文章开发的Hapi服务,数据库Mysql,废话不多说,粗略的画了下,架构图如下: Mysql镜像拉取,配置 数据库镜像查找 docker se ...

  5. Python---老王开枪

    class Person(object): """人类""" def __init__(self,name): super(Person,s ...

  6. [TJOI 2013]拯救小矮人

    Description 一群小矮人掉进了一个很深的陷阱里,由于太矮爬不上来,于是他们决定搭一个人梯.即:一个小矮人站在另一小矮人的 肩膀上,知道最顶端的小矮人伸直胳膊可以碰到陷阱口.对于每一个小矮人, ...

  7. [BJOI2006]狼抓兔子

    题目描述 现在小朋友们最喜欢的"喜羊羊与灰太狼",话说灰太狼抓羊不到,但抓兔子还是比较在行的,而且现在的兔子还比较笨,它们只有两个窝,现在你做为狼王,面对下面这样一个网格的地形: ...

  8. 【LSGDOJ 1850】滑雪课程

    题目描述 贝西去科罗拉多州去滑雪,不过还她不太会玩,只是个能力为 1 的渣渣.贝西从 0 时刻进入滑雪场,一到 T 时刻就必须离开.滑雪场里有 N 条斜坡,第 i 条斜坡滑行一次需要 D i 分钟,要 ...

  9. 性能优化之mysql优化——慢查日志的开启方式和存储

    -- MySQL优化 -- mysql 慢查日志的开启方式和存储 -- 1) 查看mysql是否开启慢查询日志 SHOW VARIABLES LIKE 'slow_query_log'; -- 2) ...

  10. input type="tel" 数字输入框显示圆点

    最近开发中遇到一个这样的需求,要求input输入框在手机端出现数字键盘的同时显示圆点,试过各种方法都不太理想, 最终经过查阅大量资料后,终于实现了需求. ●我们一般的密码输入框是这样的: <in ...