Skip to content

Commit

Permalink
Removed redundant initialization of client
Browse files Browse the repository at this point in the history
  • Loading branch information
zhendrikse committed Dec 5, 2016
1 parent 3c050f7 commit ee95f0c
Showing 1 changed file with 0 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ public void whenSendPostRequest_thenCorrect() throws IOException {
public void whenSendPostRequestWithAuthorization_thenCorrect() throws IOException {
final String postBody = "test post";

client = new OkHttpClient();

final Request request = new Request.Builder()
.url(URL_SECURED_BY_BASIC_AUTHENTICATION)
.addHeader("Authorization", Credentials.basic("test", "test"))
Expand All @@ -67,8 +65,6 @@ public void whenSendPostRequestWithAuthorization_thenCorrect() throws IOExceptio
public void whenPostJson_thenCorrect() throws IOException {
final String json = "{\"id\":1,\"name\":\"John\"}";

client = new OkHttpClient();

final RequestBody body = RequestBody.create(MediaType.parse("application/json; charset=utf-8"), "{\"id\":1,\"name\":\"John\"}");
final Request request = new Request.Builder().url(BASE_URL + "/users/detail").post(body).build();

Expand Down

0 comments on commit ee95f0c

Please sign in to comment.