- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 45 for useHttps (0.06 seconds)
-
samples/guide/src/main/java/okhttp3/recipes/kt/DevServer.kt
import okhttp3.tls.HandshakeCertificates import okhttp3.tls.internal.TlsUtil class DevServer { val handshakeCertificates = TlsUtil.localhost() val server = MockWebServer().apply { useHttps(handshakeCertificates.sslSocketFactory(), false) enqueue( MockResponse() .setResponseCode(HTTP_MOVED_TEMP) .setHeader("Location", "https://www.google.com/robots.txt"), ) }Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Wed Mar 19 19:25:20 GMT 2025 - 1.9K bytes - Click Count (0) -
okhttp/src/jvmTest/kotlin/okhttp3/RouteFailureTest.kt
handshakeCertificates.sslSocketFactory(), handshakeCertificates.trustManager, ).hostnameVerifier(RecordingHostnameVerifier()) .build() server1.useHttps(handshakeCertificates.sslSocketFactory()) server2.useHttps(handshakeCertificates.sslSocketFactory()) } private fun executeSynchronously(request: Request): RecordedResponse { val call = client.newCall(request) return try {
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Sat Jan 10 15:25:06 GMT 2026 - 11.8K bytes - Click Count (0) -
mockwebserver-deprecated/src/main/kotlin/okhttp3/mockwebserver/MockWebServer.kt
delegate.protocols = protocols } @JvmName("-deprecated_protocols") fun protocols(): List<Protocol> = delegate.protocols fun useHttps( sslSocketFactory: SSLSocketFactory, tunnelProxy: Boolean, ) { delegate.useHttps(sslSocketFactory) } fun noClientAuth() { delegate.noClientAuth() } fun requestClientAuth() { delegate.requestClientAuth()Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Wed Jun 18 00:19:42 GMT 2025 - 4.6K bytes - Click Count (0) -
mockwebserver-deprecated/api/mockwebserver.api
public final fun toProxyAddress ()Ljava/net/Proxy; public fun toString ()Ljava/lang/String; public final fun url (Ljava/lang/String;)Lokhttp3/HttpUrl; public final fun useHttps (Ljavax/net/ssl/SSLSocketFactory;Z)V } public final class okhttp3/mockwebserver/MockWebServer$Companion { } public final class okhttp3/mockwebserver/PushPromise {
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Sat Jul 22 12:28:51 GMT 2023 - 10.2K bytes - Click Count (0) -
okhttp/src/jvmTest/kotlin/okhttp3/URLConnectionTest.kt
override fun createSocket( host: String, port: Int, localHost: InetAddress, localPort: Int, ): Socket? = null } if (useHttps) { server.useHttps(handshakeCertificates.sslSocketFactory()) client = client .newBuilder() .sslSocketFactory( handshakeCertificates.sslSocketFactory(),Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Tue Jan 27 09:00:39 GMT 2026 - 133.3K bytes - Click Count (0) -
mockwebserver/api/mockwebserver3.api
public final fun takeRequest (JLjava/util/concurrent/TimeUnit;)Lmockwebserver3/RecordedRequest; public fun toString ()Ljava/lang/String; public final fun url (Ljava/lang/String;)Lokhttp3/HttpUrl; public final fun useHttps (Ljavax/net/ssl/SSLSocketFactory;)V } public final class mockwebserver3/PushPromise { public fun <init> (Ljava/lang/String;Ljava/lang/String;Lokhttp3/Headers;Lmockwebserver3/MockResponse;)V
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Fri Jun 20 11:46:46 GMT 2025 - 11.8K bytes - Click Count (0) -
mockwebserver/src/main/kotlin/mockwebserver3/MockWebServer.kt
.host(hostName) .port(port) .build() .resolve(path)!! /** * Serve requests with HTTPS rather than otherwise. */ public fun useHttps(sslSocketFactory: SSLSocketFactory) { this.sslSocketFactory = sslSocketFactory } /** * Configure the server to not perform SSL authentication of the client. This leaves
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Tue Jan 27 09:00:39 GMT 2026 - 40.3K bytes - Click Count (0) -
okhttp/src/jvmTest/kotlin/okhttp3/internal/tls/ClientAuthTest.kt
.build() } @Test fun clientAuthForWants() { val client = buildClient(clientCert, clientIntermediateCa.certificate) val socketFactory = buildServerSslSocketFactory() server.useHttps(socketFactory) server.requestClientAuth() server.enqueue( MockResponse .Builder() .body("abc") .build(), )
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Tue Jan 27 09:00:39 GMT 2026 - 13K bytes - Click Count (0) -
mockwebserver/src/test/java/mockwebserver3/MockResponseSniTest.kt
@Test fun clientSendsServerNameAndServerReceivesIt() { // java.net.ConnectException: Connection refused platform.assumeNotConscrypt() val handshakeCertificates = localhost() server.useHttps(handshakeCertificates.sslSocketFactory()) val dns = Dns { Dns.SYSTEM.lookup(server.hostName) } val client = clientTestRule .newClientBuilder()
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Wed Jun 18 12:28:21 GMT 2025 - 6.3K bytes - Click Count (0) -
okhttp/src/jvmTest/kotlin/okhttp3/InsecureForHostTest.kt
platform.assumeNotBouncyCastle() } @Test fun `untrusted host in insecureHosts connects successfully`() { val serverCertificates = platform.localhostHandshakeCertificates() server.useHttps(serverCertificates.sslSocketFactory()) server.enqueue(MockResponse()) val clientCertificates = HandshakeCertificates .Builder() .addPlatformTrustedCertificates()
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Wed Jun 18 12:28:21 GMT 2025 - 4.2K bytes - Click Count (0)