Skip to content

Commit 020cd81

Browse files
committed
OkHttp example reformatted
1 parent 552a994 commit 020cd81

File tree

1 file changed

+4
-2
lines changed
  • com.vogella.java.library.okhttp/src/com/vogella/java/library/okhttp

1 file changed

+4
-2
lines changed

com.vogella.java.library.okhttp/src/com/vogella/java/library/okhttp/TestMain.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@
1111

1212
public class TestMain {
1313
OkHttpClient client = new OkHttpClient();
14-
public static final MediaType JSON
15-
= MediaType.parse("application/json; charset=utf-8");
14+
1615

1716
String doGetRequest(String url) throws IOException {
1817
Request request = new Request.Builder()
@@ -23,6 +22,9 @@ String doGetRequest(String url) throws IOException {
2322
return response.body().string();
2423
}
2524

25+
public static final MediaType JSON
26+
= MediaType.parse("application/json; charset=utf-8");
27+
2628
// test data
2729
String bowlingJson(String player1, String player2) {
2830
return "{'winCondition':'HIGH_SCORE',"

0 commit comments

Comments
 (0)