Search in sources :

Example 21 with Response

use of org.wicketstuff.select2.Response in project Parse-SDK-Android by ParsePlatform.

the class ParseOkHttpClient method executeInternal.

@Override
/* package */
ParseHttpResponse executeInternal(ParseHttpRequest parseRequest) throws IOException {
    Request okHttpRequest = getRequest(parseRequest);
    Call okHttpCall = okHttpClient.newCall(okHttpRequest);
    Response okHttpResponse = okHttpCall.execute();
    return getResponse(okHttpResponse);
}
Also used : Response(okhttp3.Response) ParseHttpResponse(com.parse.http.ParseHttpResponse) Call(okhttp3.Call) Request(okhttp3.Request) ParseHttpRequest(com.parse.http.ParseHttpRequest)

Example 22 with Response

use of org.wicketstuff.select2.Response in project BigImageViewer by Piasy.

the class GlideProgressSupport method createInterceptor.

private static Interceptor createInterceptor(final ResponseProgressListener listener) {
    return new Interceptor() {

        @Override
        public Response intercept(Chain chain) throws IOException {
            Request request = chain.request();
            Response response = chain.proceed(request);
            return response.newBuilder().body(new OkHttpProgressResponseBody(request.url(), response.body(), listener)).build();
        }
    };
}
Also used : Response(okhttp3.Response) Request(okhttp3.Request) Interceptor(okhttp3.Interceptor)

Example 23 with Response

use of org.wicketstuff.select2.Response in project sonarqube by SonarSource.

the class CeHttpServerTest method action_is_matched_on_URL_ignoring_case.

@Test
public void action_is_matched_on_URL_ignoring_case() throws IOException {
    Response response = call(underTest.getUrl() + "/pOMpoM");
    assertIsPomPomResponse(response);
}
Also used : Response(okhttp3.Response) Test(org.junit.Test)

Example 24 with Response

use of org.wicketstuff.select2.Response in project sonarqube by SonarSource.

the class CeHttpServerTest method action_is_matched_on_URL_with_parameters.

@Test
public void action_is_matched_on_URL_with_parameters() throws IOException {
    Response response = call(underTest.getUrl() + "/pompom?toto=2");
    assertIsPomPomResponse(response);
}
Also used : Response(okhttp3.Response) Test(org.junit.Test)

Example 25 with Response

use of org.wicketstuff.select2.Response in project sonarqube by SonarSource.

the class CeHttpServerTest method action_is_matched_on_exact_URL.

@Test
public void action_is_matched_on_exact_URL() throws IOException {
    Response response = call(underTest.getUrl() + "/pompom");
    assertIsPomPomResponse(response);
}
Also used : Response(okhttp3.Response) Test(org.junit.Test)

Aggregations

Response (okhttp3.Response)1083 Request (okhttp3.Request)814 IOException (java.io.IOException)434 Test (org.junit.Test)328 Response (retrofit2.Response)319 Call (okhttp3.Call)236 ResponseBody (okhttp3.ResponseBody)208 OkHttpClient (okhttp3.OkHttpClient)192 ServiceResponse (com.microsoft.rest.ServiceResponse)179 RequestBody (okhttp3.RequestBody)128 Observable (rx.Observable)116 Callback (okhttp3.Callback)111 MockResponse (okhttp3.mockwebserver.MockResponse)93 List (java.util.List)89 HttpUrl (okhttp3.HttpUrl)81 LinkHeaders (com.instructure.canvasapi2.utils.LinkHeaders)72 TypeToken (com.google.common.reflect.TypeToken)71 ArrayList (java.util.ArrayList)71 File (java.io.File)70 JSONObject (org.json.JSONObject)65