Remove Test Code
This commit is contained in:
@@ -25,23 +25,6 @@ public class ExampleUnitTest {
|
|||||||
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void test() throws IOException {
|
public void test() {
|
||||||
File file = new File("C:\\Users\\Stardust\\Desktop\\1.txt");
|
|
||||||
System.out.println(PFiles.read(file));
|
|
||||||
String url = "http://posttestserver.com/post.php?dir=example";
|
|
||||||
OkHttpClient client = new OkHttpClient();
|
|
||||||
RequestBody formBody = new MultipartBody.Builder()
|
|
||||||
.setType(MultipartBody.FORM)
|
|
||||||
.addFormDataPart("file", file.getName(),
|
|
||||||
RequestBody.create(MediaType.parse("text/plain"), file))
|
|
||||||
.addFormDataPart("other_field", "other_field_value")
|
|
||||||
.build();
|
|
||||||
Request request = new Request.Builder().url(url).post(formBody).build();
|
|
||||||
Response response = client.newCall(request).execute();
|
|
||||||
System.out.println(response.body().string());
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
public boolean equals(int i, int j) {
|
|
||||||
return i == j;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user