Send a get request with parameters and solve the httpclient coding problem
Package cn.wemart.httppost
Import java.io.BufferedReader
Import java.io.IOException
Import java.io.InputStreamReader
Import java.io.UnsupportedEncodingException
Import java.net.URI
Import java.net.URISyntaxException
Import java.util.ArrayList
Import java.util.HashMap
Import java.util.List
Import java.util.Map
Import net.sf.json.JSONObject
Import org.apache.http.HttpEntity
Import org.apache.http.NameValuePair
Import org.apache.http.client.ClientProtocolException
Import org.apache.http.client.entity.UrlEncodedFormEntity
Import org.apache.http.client.methods.CloseableHttpResponse
Import org.apache.http.client.methods.HttpGet
Import org.apache.http.client.methods.HttpPost
Import org.apache.http.impl.client.CloseableHttpClient
Import org.apache.http.impl.client.HttpClients
Import org.apache.http.message.BasicNameValuePair
Import org.apache.http.protocol.HTTP
Import org.apache.http.util.EntityUtils
Import org.dom4j.DocumentException
Public class ExecuteGet {
/ * *
* Assembly request parameters
* @ param keyVlaueList
, /
Public static Map setPostPara (String [] keyVlaueList) throws DocumentException {
Map map = new HashMap ()
For (int I = 0 position I)