“OkHttp” https://github.com/square/okhttp 1 2 3 4 5 6 7 8 9 10 11 12 13 RequestBody body = RequestBody.create(MediaTypeJson, jsonStr0); Request request = new Request.Builder() .url(url0) .post(body) .build(); String resp = null; try (Response response = client.newCall(request).execute()) { resp = response.body().string(); } catch (IOException e) { e.printStackTrace(); } proxy 1 2 static Proxy proxy = new Proxy(Proxy.Type.HTTP, new InetSocketAddress("127.0.0.1", 8899)); static OkHttpClient client = new OkHttpClient.Builder().proxy(proxy).build(); 1. 历史上