In addition to Weibo, there is also WeChat
Please pay attention

WeChat public account
Shulou
 
            
                     
                
2025-10-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/03 Report--
The attachment is from Baidu.
Script body:
/ *
* LoadRunner Javascript. (Build: _ build_number_)
*
* Script Description:
*
, /
Import lrapi.lr
Public class Actions
{
Public int init () throws Throwable {
Return 0
} / / end of init
Public int action () throws Throwable {
Com.CTLPTest ct1 = new com.CTLPTest ()
Ct1.main (null)
Return 0
} / / end of action
Public int end () throws Throwable {
Return 0
} / / end of end
}
Contents of the jar package:
Package com;import java.io.InputStream;import java.net.HttpURLConnection;import java.net.URL;import java.security.cert.X509Certificate;import java.util.Properties;import java.util.Random;import javax.net.ssl.HostnameVerifier;import javax.net.ssl.SSLSession;import javax.net.ssl.X509TrustManager;public class CTLPTest {public static void main (String [] args) {CTLPTest lbs = new CTLPTest (); String ltpUrl = lbs.ltpRequestUrl () System.out.println ("ltpUrl:" + ltpUrl); System.out.println ("lbs.ltpRequestUrl (ltpUrl):" + lbs.ltpRequestUrl (ltpUrl));} public int ltpRequestUrl (String ltpRequestUrl) {int returnCount =-1 Try {URL url = new URL (ltpRequestUrl); Properties prop = System.getProperties (); System.setProperty ("http.proxyHost", "proxy.com"); System.setProperty ("http.proxyPort", "80") / / http HttpURLConnection http = (HttpURLConnection) url.openConnection (); http.setUseCaches (false); http.connect (); / / http InputStream in = http.getInputStream () / / byte [] b = new byte [in.available ()]; in.read (b); / / String res = new String (b); System.out.println ("res:") System.out.println (res); / / res, / int of = res.indexOf ("resultCode") If (of < 0) {System.out.println ("* failure***"); returnCount =-1 } else {returnCount = 1;}} catch (Exception e) {System.out.println ("Exception"); System.out.println (e); returnCount =-1 } return returnCount;} public String ltpRequestUrl () {StringBuilder param = new StringBuilder ("http://xxx.xxx.com");// param.append (" userid-1 "); / / param.append (" & appName=LBS&Apikey=D39hr1FgplZSjV2eNVW71wvbYbl8Mip4 ") Return param.toString ();}}
Attachment: http://down.51cto.com/data/2367948
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about

The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r


A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from

Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope





 
             
            About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.