- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 72 for factor (0.2 sec)
-
samples/guide/src/main/java/okhttp3/recipes/PostStreaming.java
sink.writeUtf8("-------\n"); for (int i = 2; i <= 997; i++) { sink.writeUtf8(String.format(" * %s = %s\n", i, factor(i))); } } private String factor(int n) { for (int i = 2; i < n; i++) { int x = n / i; if (x * i == n) return factor(x) + " × " + i; } return Integer.toString(n); } }; Request request = new Request.Builder()
Java - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Fri Jul 06 03:18:15 GMT 2018 - 2.1K bytes - Viewed (0) -
docs/features/events.md
0001 0.624 responseBodyEnd 0001 0.624 connectionReleased 0001 0.624 callEnd ``` The `EventListener.Factory` also makes it possible to limit metrics to a subset of calls. This one captures metrics on a random 10%: ```java class MetricsEventListener extends EventListener { private static final Factory FACTORY = new Factory() { @Override public EventListener create(Call call) { if (Math.random() < 0.10) {
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sun Feb 06 02:19:09 GMT 2022 - 7.7K bytes - Viewed (0) -
okhttp-sse/src/main/kotlin/okhttp3/sse/EventSources.kt
level = DeprecationLevel.HIDDEN, ) @JvmStatic fun createFactory(client: OkHttpClient) = createFactory(client as Call.Factory) @JvmStatic fun createFactory(callFactory: Call.Factory): EventSource.Factory { return EventSource.Factory { request, listener -> val actualRequest = if (request.header("Accept") == null) {
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sat Apr 06 04:18:15 GMT 2024 - 1.6K bytes - Viewed (1) -
okhttp-android/api/okhttp-android.api
public static synthetic fun androidLogging$default (Lokhttp3/logging/HttpLoggingInterceptor$Companion;ILjava/lang/String;ILjava/lang/Object;)Lokhttp3/logging/HttpLoggingInterceptor; public static synthetic fun androidLogging$default (Lokhttp3/logging/LoggingEventListener$Companion;ILjava/lang/String;ILjava/lang/Object;)Lokhttp3/logging/LoggingEventListener$Factory;
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Apr 01 11:07:32 GMT 2024 - 1.3K bytes - Viewed (1) -
okhttp/src/main/kotlin/okhttp3/internal/platform/android/BouncyCastleSocketAdapter.kt
sslParameters.applicationProtocols = Platform.alpnProtocolNames(protocols).toTypedArray() bcSocket.parameters = sslParameters } } companion object { val factory = object : DeferredSocketAdapter.Factory { override fun matchesSocket(sslSocket: SSLSocket): Boolean { return BouncyCastlePlatform.isSupported && sslSocket is BCSSLSocket }
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 2.1K bytes - Viewed (0) -
okcurl/src/main/kotlin/okhttp3/curl/Main.kt
var client: Call.Factory? = null override fun run() { LoggingUtil.configureLogging(debug = verbose, showHttp2Frames = showHttp2Frames, sslDebug = sslDebug) commonRun() } fun createRequest(): Request = commonCreateRequest() fun createClient(): Call.Factory { val builder = OkHttpClient.Builder() builder.followSslRedirects(followRedirects)
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 5.7K bytes - Viewed (1) -
okhttp/src/main/kotlin/okhttp3/internal/platform/Platform.kt
open fun newSSLContext(): SSLContext = SSLContext.getInstance("TLS") open fun platformTrustManager(): X509TrustManager { val factory = TrustManagerFactory.getInstance( TrustManagerFactory.getDefaultAlgorithm(), ) factory.init(null as KeyStore?) val trustManagers = factory.trustManagers!! check(trustManagers.size == 1 && trustManagers[0] is X509TrustManager) {
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 9.8K bytes - Viewed (1) -
okhttp/src/test/java/okhttp3/OpenJSSETest.kt
assertThat(response.exchangeAccessor!!.connectionAccessor.socket()) .isInstanceOf<SSLSocketImpl>() } } @Test fun testSupportedProtocols() { val factory = SSLSocketFactoryImpl() val s = factory.createSocket() as SSLSocketImpl assertEquals(listOf("TLSv1.3", "TLSv1.2"), s.enabledProtocols.toList()) } @Test @Disabled fun testMozilla() { assumeNetwork()
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Sat Jan 20 10:30:28 GMT 2024 - 3.7K bytes - Viewed (0) -
okhttp-sse/src/main/kotlin/okhttp3/sse/EventSource.kt
/** * Immediately and violently release resources held by this event source. This does nothing if * the event source has already been closed or canceled. */ fun cancel() fun interface Factory { /** * Creates a new event source and immediately returns it. Creating an event source initiates an * asynchronous process to connect the socket. Once that succeeds or fails, `listener` will be
Plain Text - Registered: Fri May 03 11:42:14 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 1.4K bytes - Viewed (0) -
samples/tlssurvey/src/main/kotlin/okhttp3/survey/ssllabs/SslLabsScrape.kt
import okhttp3.survey.types.Client import okhttp3.survey.types.SuiteId import retrofit2.Retrofit import retrofit2.converter.moshi.MoshiConverterFactory class SslLabsScraper( private val callFactory: Call.Factory, ) { private val moshi = Moshi.Builder().build() private val moshiConverterFactory = MoshiConverterFactory.create(moshi) private val retrofit = Retrofit.Builder()
Plain Text - Registered: Fri Mar 29 11:42:11 GMT 2024 - Last Modified: Mon Jan 08 01:13:22 GMT 2024 - 1.7K bytes - Viewed (0)