用的eclipse maven依赖只有json,配好环境后package foursituationsserver; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.net.MalformedURLException; import java.net.URL; import java.net.URLConnection; import java.util.concurrent.TimeUnit;
import com.google.common.cache.Cache; import com.google.common.cache.CacheBuilder; public class postlogin {
public static void main(String[]args) throws MalformedURLException, IOException{
URLConnection conn=new URL("https://my.oschina.net/u/3938910").openConnection();
conn.connect();
InputStream input=conn.getInputStream();
BufferedReader reader=new BufferedReader(new InputStreamReader(input,"UTF-8"));
System.out.println(reader.readLine());