Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 97 for apply (0.15 sec)

  1. okhttp-sse/src/main/kotlin/okhttp3/sse/EventSources.kt

            if (request.header("Accept") == null) {
              request.newBuilder().addHeader("Accept", "text/event-stream").build()
            } else {
              request
            }
    
          RealEventSource(actualRequest, listener).apply {
            connect(callFactory)
          }
        }
      }
    
      @JvmStatic
      fun processResponse(
        response: Response,
        listener: EventSourceListener,
      ) {
    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)
  2. okhttp/src/main/kotlin/okhttp3/Dns.kt

            try {
              return InetAddress.getAllByName(hostname).toList()
            } catch (e: NullPointerException) {
              throw UnknownHostException("Broken system behaviour for dns lookup of $hostname").apply {
                initCause(e)
              }
            }
          }
        }
      }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.2K bytes
    - Viewed (0)
  3. okhttp-logging-interceptor/src/main/kotlin/okhttp3/logging/HttpLoggingInterceptor.kt

         * un-deprecated because Java callers can't chain when assigning Kotlin vals. (The getter remains
         * deprecated).
         */
        fun setLevel(level: Level) =
          apply {
            this.level = level
          }
    
        @JvmName("-deprecated_level")
        @Deprecated(
          message = "moved to var",
          replaceWith = ReplaceWith(expression = "level"),
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 06 09:14:38 GMT 2024
    - 11.2K bytes
    - Viewed (1)
  4. okcurl/src/main/kotlin/okhttp3/curl/Main.kt

            override fun getAcceptedIssuers(): Array<X509Certificate> = arrayOf()
          }
    
        private fun createInsecureSslSocketFactory(trustManager: TrustManager): SSLSocketFactory =
          Platform.get().newSSLContext().apply {
            init(null, arrayOf(trustManager), null)
          }.socketFactory
    
        private fun createInsecureHostnameVerifier(): HostnameVerifier = HostnameVerifier { _, _ -> true }
      }
    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)
  5. okhttp/src/main/kotlin/okhttp3/Authenticator.kt

     *
     * Applications may configure OkHttp with an authenticator for origin servers, or proxy servers,
     * or both.
     *
     * ## Authentication Retries
     *
     * If your authentication may be flaky and requires retries you should apply some policy
     * to limit the retries by the class of errors and number of attempts.  To get the number of
     * attempts to the current point use this function.
     *
     * ```java
     * private int responseCount(Response response) {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.5K bytes
    - Viewed (0)
  6. okhttp/src/main/kotlin/okhttp3/internal/platform/Platform.kt

      open fun newSslSocketFactory(trustManager: X509TrustManager): SSLSocketFactory {
        try {
          return newSSLContext().apply {
            init(null, arrayOf<TrustManager>(trustManager), null)
          }.socketFactory
        } catch (e: GeneralSecurityException) {
          throw AssertionError("No System TLS: $e", e) // The system has no TLS. Just give up.
    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)
  7. okhttp/src/main/kotlin/okhttp3/internal/cache2/Relay.kt

        get() = file == null
    
      @Throws(IOException::class)
      private fun writeHeader(
        prefix: ByteString,
        upstreamSize: Long,
        metadataSize: Long,
      ) {
        val header =
          Buffer().apply {
            write(prefix)
            writeLong(upstreamSize)
            writeLong(metadataSize)
            require(size == FILE_HEADER_SIZE)
          }
    
        val fileOperator = FileOperator(file!!.channel)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 11.8K bytes
    - Viewed (0)
  8. okhttp/src/main/kotlin/okhttp3/internal/connection/RealCall.kt

      internal val eventListener: EventListener = client.eventListenerFactory.create(this)
    
      private val timeout =
        object : AsyncTimeout() {
          override fun timedOut() {
            ******@****.***()
          }
        }.apply {
          timeout(client.callTimeoutMillis.toLong(), MILLISECONDS)
        }
    
      private val executed = AtomicBoolean()
    
      // These properties are only accessed by the thread executing the call.
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 17.9K bytes
    - Viewed (2)
  9. docs/changelogs/changelog_4x.md

     *  Fix: Don't lose HTTP/2 flow control bytes when incoming data races with a stream close. If this
        happened enough then eventually the connection would stall.
    
     *  Fix: Acknowledge and apply inbound HTTP/2 settings atomically. Previously we had a race where we
        could use new flow control capacity before acknowledging it, causing strict HTTP/2 servers to
        fail the call.
    
    
    ## Version 4.1.1
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 17 13:25:31 GMT 2024
    - 25.2K bytes
    - Viewed (0)
  10. okhttp/src/test/java/okhttp3/RecordedResponse.kt

        apply {
          assertThat(response!!.code).isEqualTo(expectedCode)
        }
    
      fun assertSuccessful() =
        apply {
          assertThat(failure).isNull()
          assertThat(response!!.isSuccessful).isTrue()
        }
    
      fun assertNotSuccessful() =
        apply {
          assertThat(response!!.isSuccessful).isFalse()
        }
    
      fun assertHeader(
        name: String,
        vararg values: String?,
      ) = apply {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.3K bytes
    - Viewed (0)
Back to top