使用HttpClient进行远程接口测试
前两天在工作中,项目组长给我了一个远程接口让我给测一下,因为是http协议,所以我首先想到了用httpClient工具类来测试,网上一查,找到了好多示例代码,随便复制了一个demo进行了简单的修改,结果怎么测试都是连接超时,试了很多个demo也不好使,最后发现是因为我们公司访问外网是通过代理,所以在进行测试的时候需要配置代理。一下是我的测试程序
用到的jar包:
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAARMAAADcCAIAAADcAtI6AAAX7UlEQVR4nO2d7XPURp7H+0/Iv3DJJa8hwa5Bf0hS4ZILMV693LzcglSycLhCYUxWm9sc5GF3L1W3gRAXsXHQ4oTLLltwRUIwT8YGtMY8ODbg8dhm7HmwZ+h7oaeW1NLIPT0eSfP9VBclWr9+kN1fq0ej/jahMvj25yenx/IzhfWnFYqUsTRTWD89lv/25ydShkpmIFJq6R+6u7BaXyjR/CrNr9KxM+98d+Sl0f968czHL/71oxdP//6Fkd+9cOrw88MDz4+deceMQUpLWijRhdV6/9BdKUMlM8hRTt/g1HKFzq9Y6bsjLz2rLz5bm62Xb9ef/lRbGK0/+qo288n6vYHvjrzkhCGlJS1XaN/glJShkhmkKWepTB8XreS55/znv57+/Qvf/u75U4efHx74l7Ez7zhhSI9PqqRbu9iWpq9p24iy/1qs4KUylONHmnIWy/TRUyvdnVnY/fGZu3PF5dXq8mp1bW1tebVyd664++Mzd2cWnDCkR4Mq6dYuNl8JIW8O8k5d0bYRE+U/rgRPBTJD0iKUEyCuci5cuLCyshJ2tm9wqlCis0/p7FN6/ur0wF/OP5gv5ZfLxVKlWKqUq9ViqTq/XH4wXxr4y/nzV6fNSKTZQZV0axfEazD2dRPSrb7RTd4YDJ7V3yB2fnMNFUpQjp+4yvnyyy+PHz+ez+e5Z/sGpxZW6cwSnVmiX4xcOn524mG+VChWypVquVKt19bKlWrhaWUmXzp+duKLkUtmJNLM1yrp1s43W4+xt5v829fRlRt7u5W9Y4JNLKxCOX42oJwnT5589tlnMzMzwbN9g1PzK/T+Ir2/SP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IUjy8Ety30A7SJAPQZK/pk9y30BbSIYPQZJX3ie5b6B9YH0OACJAOQCIAOUAIAKUA4AIUA4AIsCHAAAR4EMAgAgd4kPgfRG6Adb7Nen7Bgff124iGfUh8LMB5WzeezYwS0gzmfQhCBKtHI9YYuzDLgWYJaSbDPoQ8EiccmCWkHYy5kPA+AF4whjl+CthdqB22wyuOWXb9LkO6CpRNN2qVtXdQqEKhFlC+smgD4FHL26FDVwEePccd1fcYLx3Z1I7ztRMgzU7MEvIApnyIQgMLXYlZ1wXAbft0IEZMYBD97h2OgmzhGyQJR+C4ImAcmK4CEQqh6vPGHtce3voB2YJKSRjPgSeM8x/bOXEcBGImq3xhbsh5XiAWUJ6yZgPgaEpRFUDDwjYzzm8Sqxczqf2iCcElImRqByYJaSDjPkQdPbg6Oyr32Qy5kPQ0WMHrxBsJhnzIehU5cAsYdPB+hwARIByABABygFABCgHABGgHABEgA8BACLAhwAAEZLkQ5B28E1kJ5EkH4JNI3qFnPBZKKeT6BAfAhZdZd8m9Y//Zs6CDqJDfAjC8Cybk3oWZJwk+RBQ6lk+qamcN+t9a5g5mTwDg6jmIu4bGzwLG4BOIkk+BB57AWZZI3fWxHcI4BoYhBK9gGbDZ2ED0EkkyYfANxg9y5q9f6hDF+Bzl8Txrf2i7cpEzsIGoJNIkg9BqHJMzKHIdVtiRcK3/gg2JVk2FDYAnUWSfAjCZ2ua56MCDXcIiKMc3jTOu5hZ8CxsADqJJPkQUM/6efYJQdB6MOoJQbRy2HLOFM4Z/c2chQ1AJ5EkHwIfm2XwLA1Io5NIkA8BpYameB46p0846eoxaIJk+BA4MA+k0jQIYQPQeWB9DgAiQDkAiADlACAClAOACP8PE2iKZp2/5dYAAAAASUVORK5CYII=" alt="" />
package com.lym.test; import org.apache.http.HttpEntity;
import org.apache.http.HttpHost;
import org.apache.http.client.config.RequestConfig;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClientBuilder;
import org.apache.http.util.EntityUtils; import com.google.gson.JsonObject; public class HttpClientTest { public static void main(String args[]) throws Exception { // 创建HttpClientBuilder
HttpClientBuilder httpClientBuilder = HttpClientBuilder.create();
// HttpClient
CloseableHttpClient closeableHttpClient = httpClientBuilder.build();
// 依次是目标请求地址,端口号,协议类型
HttpHost target = new HttpHost("61.144.244.6:8888/sztmerchant/merchant/addIsztMerchant.htm", 8888, "http");
// 依次是代理地址,代理端口号,协议类型
HttpHost proxy = new HttpHost("proxy3.bj.petrochina", 8080, "http");
RequestConfig config = RequestConfig.custom().setProxy(proxy).build(); // 请求地址
HttpPost httpPost = new HttpPost("http://61.144.244.6:8888/sztmerchant/merchant/addIsztMerchant.htm");
// 设置头信息
httpPost.addHeader("Content-type", "application/json; charset=utf-8");
httpPost.setHeader("Accept", "application/json");
httpPost.setConfig(config); // 创建参数json串
JsonObject jsonObj = new JsonObject();
jsonObj.addProperty("merchantNo", "33300911238");
jsonObj.addProperty("merchantName", "电商运营生产测试1238");
String jsonStr = jsonObj.toString();
System.out.println("parameters: " + jsonStr); StringEntity entity;
try {
entity = new StringEntity(jsonStr, "UTF-8");
httpPost.setEntity(entity);
CloseableHttpResponse response = closeableHttpClient.execute(target, httpPost);
// getEntity()
HttpEntity httpEntity = response.getEntity();
if (httpEntity != null) {
// 打印响应内容
System.out.println("result: " + EntityUtils.toString(httpEntity, "UTF-8"));
}else {
System.out.println("无响应内容");
}
// 释放资源
if(closeableHttpClient != null) {
closeableHttpClient.close();
}
} catch (Exception e) {
e.printStackTrace();
}
} }
使用HttpClient进行远程接口测试的更多相关文章
- HttpClient实现远程调用
在项目中,我们常常遇到远程调用的问题,一个模块总是无法单独存在,总需要调用第三方或者其他模块的接口.这里我们就涉及到了远程调用. 原来在 ITOO中,我们是通过使用EJB来实现远程调用的 ...
- HttpClient + Testng实现接口测试
HttpClient教程 : https://www.yeetrack.com/?p=779 一,所需要的环境: 1,testng .httpclient和相关的依赖包 二.使用HttpClient登 ...
- HttpClient远程接口调用-实名认证
1.HttpClient远程接口调用 1)用户注册 注册按钮button提交表单时,要return false form表单 <!-- action="http://localhost ...
- 飞信免费发送接口API的测试 httpClient
测试飞信免费发送接口API的测试(HTTPClient实现) 使用优点:快捷,方便 使用缺点:用户的各种信息以明文形式在网络中传输不安全. 仅仅用于测试 package cn.com.vnvtrip. ...
- 在Core环境下用WebRequest连接上远程的web Api 实现数据的简单CRUD(续)
这篇博客是上篇博客的续写,上篇博客用的是HttpClient取远程数据,用WebRequest提交,更新,删除数据.上篇本来想全文都用httpClient,可是当时无论如何也实现不了数据的提交,于是换 ...
- SpringBoot关于系统之间的远程互相调用
1.SpringBoot关于系统之间的远程互相调用 可以采用RestTemplate方式发起Rest Http调用,提供有get.post等方式. 1.1远程工具类 此处使用Post方式,参考下面封装 ...
- Task.Delay方法的2个应用实例,单元测试等待,限时限次下载远程资源
如果想让程序异步等待一段时间,可以考虑使用Task.Delay方法. 比如,在单元测试中模拟一个异步操作. static async Task<T> DelayedResult<T& ...
- webservice的接口协议(HTTPClient 、RestTemplate HttpURLConnection)
HTTP协议时Internet上使用的很多也很重要的一个协议,越来越多的java应用程序需要通过HTTP协议来访问网络资源. HTTPClient提供的主要功能: 1.实现了所有HTTP的方法(GET ...
- RestTemplate配置
什么是RestTemplate? RestTemplate是Spring提供的用于访问Rest服务的客户端,RestTemplate提供了多种便捷访问远程Http服务的方法,能够大大提高客户端的编写效 ...
随机推荐
- Express+Less+Gulp配置高效率开发环境
版权声明:本文由金朝麟原创文章,转载请注明出处: 文章原文链接:https://www.qcloud.com/community/article/627049001486519548 来源:腾云阁 h ...
- Android 屏幕适配:最全面的解决方案
转自:https://www.jianshu.com/p/ec5a1a30694b 前言 Android的屏幕适配一直以来都在折磨着我们Android开发者,本文将结合: Google的官方权威适配文 ...
- SSH安装篇之——SecureCRT连接(内网和外网)虚拟机中的Linux系统(Ubuntu)
最近在学习Linux,看了网上很多SecureCRT连接本地虚拟机当中的Linux系统,很多都是需要设置Linux的配置文件,有点繁琐,所以自己就摸索了一下,把相关操作贴出来分享一下. SecureC ...
- NC 的简单使用
netcat被誉为网络安全界的’瑞士军刀’,相信没有什么人不认识它吧……一个简单而有用的工具,透过使用TCP或UDP协议的网络连接去读写数据.它被设计成一个稳定的后门工具,能够直接由其它程序和脚本轻松 ...
- jenkins与SonarQube集成
一.SonarQube 我的理解是,SonarQube就是一个对代码进行分析的平台,其功能可以通过插件扩展.支持多种语言,也支持静态代码检查.发现潜在bug等. 以下是参考信息: 维基百科:https ...
- 【CF603E】Pastoral Oddities cdq分治+并查集
[CF603E]Pastoral Oddities 题意:有n个点,依次加入m条边权为$l_i$的无向边,每次加入后询问:当前图是否存在一个生成子图,满足所有点的度数都是奇数.如果有,输出这个生成子图 ...
- parameter/argument
根据网上一些资料,对parameter和argument的区别,做如下的简单说明.1. parameter是指函数定义中参数,而argument指的是函数调用时的实际参数.2. 简略描述为:param ...
- 服务器推技术研究Comet
服务器推技术 最近参与的一个关于股票的项目,有这样一个需求.服务器需要主动推送给客户端消息.这和传统的Web模式不同.传统的Web系统,客户端和服务器的交互是这样的: 客户端先和服务器建立一个TCP连 ...
- POJ-2029 Get Many Persimmon Trees(动态规划)
Get Many Persimmon Trees Time Limit: 1000MS Memory Limit: 30000K Total Submissions: 3987 Accepted: 2 ...
- 专访知乎张伟:RFC技术评审机制如何助力知乎实现工程文化落地
2017年5月20-21日,MPD工作坊·上海站将于上海徐汇区光大会展中心举办,本届MPD工作坊请到了知乎工程高级总监张伟进行主题为<工程师文化落地6项指南>的3小时深度分享.在工作坊举办 ...