- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for callOkHttp (0.13 sec)
-
module-tests/src/test/java/okhttp3/modules/test/JavaModuleTest.java
import static org.junit.jupiter.api.Assertions.assertTrue; class JavaModuleTest { @Test public void testVisibility() { // Just check we can run code that depends on OkHttp types OkHttpCaller.callOkHttp(HttpUrl.get("https://square.com/robots.txt")); } @Test public void testMockWebServer() throws IOException { MockWebServer server = new MockWebServer();Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Sun Sep 21 06:22:22 UTC 2025 - 2.1K bytes - Viewed (0) -
module-tests/src/main/java/okhttp3/modules/OkHttpCaller.java
import okhttp3.Request; import okhttp3.logging.HttpLoggingInterceptor; import okhttp3.logging.LoggingEventListener; /** * Just checking compilation works */ public class OkHttpCaller { public static Call callOkHttp(HttpUrl url) { OkHttpClient client = new OkHttpClient .Builder() .eventListenerFactory(new LoggingEventListener.Factory(HttpLoggingInterceptor.Logger.DEFAULT)) .build();Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Sun Sep 21 06:22:22 UTC 2025 - 1.2K bytes - Viewed (0) -
module-tests/src/main/java/okhttp3/modules/Main.java
package okhttp3.modules; import okhttp3.Call; import okhttp3.HttpUrl; import java.io.IOException; public class Main { public static void main(String[] args) throws IOException { Call call = OkHttpCaller.callOkHttp(HttpUrl.get("https://square.com/robots.txt")); System.out.println(call.execute().body().string()); }Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Sun Sep 21 06:22:22 UTC 2025 - 934 bytes - Viewed (0)