Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Parse/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@ android {
dependencies {
compile 'com.parse.bolts:bolts-tasks:1.4.0'

provided 'com.squareup.okhttp3:okhttp:3.2.0'
provided 'com.squareup.okhttp3:okhttp:3.3.1'
provided 'com.facebook.stetho:stetho:1.3.0'

testCompile 'org.robolectric:robolectric:3.0'
testCompile 'org.skyscreamer:jsonassert:1.2.3'
testCompile 'org.mockito:mockito-core:1.10.19'
testCompile 'com.squareup.okhttp3:mockwebserver:3.2.0'
testCompile 'com.squareup.okhttp3:mockwebserver:3.3.1'
}

android.libraryVariants.all { variant ->
Expand Down
22 changes: 11 additions & 11 deletions Parse/src/test/java/com/parse/ParseOkHttpClientTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,6 @@
import com.parse.http.ParseHttpRequest;
import com.parse.http.ParseHttpResponse;
import com.parse.http.ParseNetworkInterceptor;
import okhttp3.MediaType;
import okhttp3.Protocol;
import okhttp3.Request;
import okhttp3.RequestBody;
import okhttp3.Response;
import okhttp3.ResponseBody;
import okhttp3.mockwebserver.MockResponse;
import okhttp3.mockwebserver.MockWebServer;
import okhttp3.mockwebserver.RecordedRequest;

import org.json.JSONException;
import org.json.JSONObject;
Expand All @@ -37,6 +28,15 @@
import java.util.concurrent.TimeUnit;
import java.util.zip.GZIPOutputStream;

import okhttp3.MediaType;
import okhttp3.Protocol;
import okhttp3.Request;
import okhttp3.RequestBody;
import okhttp3.Response;
import okhttp3.ResponseBody;
import okhttp3.mockwebserver.MockResponse;
import okhttp3.mockwebserver.MockWebServer;
import okhttp3.mockwebserver.RecordedRequest;
import okio.Buffer;
import okio.BufferedSource;

Expand Down Expand Up @@ -355,7 +355,7 @@ private void verifyServerResponse(ParseHttpResponse parseResponse) throws IOExce
// Generate a ParseHttpRequest sent to server
private ParseHttpRequest generateClientRequest() throws Exception {
Map<String, String> headers = new HashMap<>();
headers.put("requestKey", "requestValue");
headers.put("requestkey", "requestValue");
JSONObject json = new JSONObject();
json.put("key", "value");
ParseHttpRequest parseRequest = new ParseHttpRequest.Builder()
Expand All @@ -372,7 +372,7 @@ private ParseHttpRequest generateClientRequest() throws Exception {
private void verifyClientRequest(ParseHttpRequest parseRequest) throws IOException {
assertEquals(server.url("/").toString(), parseRequest.getUrl());
assertEquals(ParseHttpRequest.Method.POST, parseRequest.getMethod());
assertEquals("requestValue", parseRequest.getHeader("requestKey"));
assertEquals("requestValue", parseRequest.getHeader("requestkey"));
assertEquals("application/json", parseRequest.getBody().getContentType());
JSONObject json = new JSONObject();
try {
Expand Down