okhttp post form表单
1 OkHttpClient okHttpClient = new OkHttpClient.Builder().build(); 2 FormBody formBody = new FormBody.Builder() 3 .add("method","applyLimiteUpdate") 4 .build(); 5 6 Request request = new Request.Builder() 7 .url("http://1.1.1.1/main.htm") 8 .post(formBody) 9 .build(); 10 11 Response response = okHttpClient.newCall(request).execute(); 12 System.out.println(response.toString());