Search Options

Results per page
Sort
Preferred Languages
Advance

Results 431 - 440 of 527 for Fun (0.02 sec)

  1. okhttp-urlconnection/src/main/kotlin/okhttp3/JavaNetAuthenticator.kt

     *     .build()
     * ```
     */
    @Deprecated(message = "Use okhttp3.Authenticator.Companion.JAVA_NET_AUTHENTICATOR instead")
    class JavaNetAuthenticator : Authenticator {
      @Throws(IOException::class)
      override fun authenticate(
        route: Route?,
        response: Response,
      ): Request? = JAVA_NET_AUTHENTICATOR.authenticate(route, response)
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 1.3K bytes
    - Viewed (0)
  2. okhttp/src/test/java/okhttp3/CommonRequestBodyTest.kt

     */
    package okhttp3
    
    import assertk.assertThat
    import assertk.assertions.isEqualTo
    import kotlin.test.Test
    import okhttp3.RequestBody.Companion.toRequestBody
    
    class CommonRequestBodyTest {
      @Test
      fun correctContentType() {
        val body = "Body"
        val requestBody = body.toRequestBody(MediaType("text/plain", "text", "plain", arrayOf()))
    
        val contentType = requestBody.contentType()!!
    
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Wed Dec 20 23:27:07 UTC 2023
    - 1.1K bytes
    - Viewed (0)
  3. mockwebserver/src/main/kotlin/mockwebserver3/MockResponseBody.kt

     * called by readers.
     */
    @ExperimentalOkHttpApi
    interface MockResponseBody {
      /** The length of this response in bytes, or -1 if unknown. */
      val contentLength: Long
    
      @Throws(IOException::class)
      fun writeTo(sink: BufferedSink)
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Tue Jan 23 14:31:42 UTC 2024
    - 1.1K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/internal/connection/ExchangeFinder.kt

     * See the License for the specific language governing permissions and
     * limitations under the License.
     */
    package okhttp3.internal.connection
    
    interface ExchangeFinder {
      val routePlanner: RoutePlanner
    
      fun find(): RealConnection
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Wed Dec 20 23:27:07 UTC 2023
    - 730 bytes
    - Viewed (0)
  5. okhttp-dnsoverhttps/src/main/kotlin/okhttp3/dnsoverhttps/BootstrapDns.kt

     */
    internal class BootstrapDns(
      private val dnsHostname: String,
      private val dnsServers: List<InetAddress>,
    ) : Dns {
      @Throws(UnknownHostException::class)
      override fun lookup(hostname: String): List<InetAddress> {
        if (this.dnsHostname != hostname) {
          throw UnknownHostException(
            "BootstrapDns called for $hostname instead of $dnsHostname",
          )
        }
    
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 1.3K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/internal/http/ExternalHttp2Example.kt

     * limitations under the License.
     */
    package okhttp3.internal.http
    
    import okhttp3.OkHttpClient
    import okhttp3.Protocol
    import okhttp3.Request
    
    object ExternalHttp2Example {
      @JvmStatic
      fun main(args: Array<String>) {
        val client =
          OkHttpClient.Builder()
            .protocols(listOf(Protocol.HTTP_2, Protocol.HTTP_1_1))
            .build()
        val call =
          client.newCall(
            Request.Builder()
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 1.4K bytes
    - Viewed (0)
  7. mockwebserver/src/main/kotlin/mockwebserver3/internal/TriggerSink.kt

     */
    internal class TriggerSink(
      private val delegate: Sink,
      private val triggerByteCount: Long,
      private val trigger: () -> Unit,
    ) : Sink by delegate {
      private var bytesWritten = 0L
    
      override fun write(
        source: Buffer,
        byteCount: Long,
      ) {
        if (byteCount == 0L) return // Avoid double-triggering.
    
        if (bytesWritten == triggerByteCount) {
          source.skip(byteCount)
          return
        }
    
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 1.4K bytes
    - Viewed (0)
  8. okhttp-brotli/src/main/kotlin/okhttp3/brotli/BrotliInterceptor.kt

     * responses.  n.b. this replaces the transparent gzip compression in BridgeInterceptor.
     */
    object BrotliInterceptor : Interceptor {
      override fun intercept(chain: Interceptor.Chain): Response {
        return if (chain.request().header("Accept-Encoding") == null) {
          val request =
            chain.request().newBuilder()
              .header("Accept-Encoding", "br,gzip")
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 1.3K bytes
    - Viewed (0)
  9. okhttp-logging-interceptor/src/main/kotlin/okhttp3/logging/internal/IsProbablyUtf8.kt

    import okio.Buffer
    
    /**
     * Returns true if the body in question probably contains human readable text. Uses a small
     * sample of code points to detect unicode control characters commonly used in binary file
     * signatures.
     */
    fun Buffer.isProbablyUtf8(): Boolean {
      try {
        val prefix = Buffer()
        val byteCount = size.coerceAtMost(64)
        copyTo(prefix, 0, byteCount)
        for (i in 0 until 16) {
          if (prefix.exhausted()) {
            break
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sun Jan 07 16:05:34 UTC 2024
    - 1.4K bytes
    - Viewed (0)
  10. okhttp/src/main/kotlin/okhttp3/Connection.kt

     */
    interface Connection {
      /** Returns the route used by this connection. */
      fun route(): Route
    
      /**
       * Returns the socket that this connection is using. Returns an
       * [SSL socket][javax.net.ssl.SSLSocket] if this connection is HTTPS. If this is an HTTP/2
       * connection the socket may be shared by multiple concurrent calls.
       */
      fun socket(): Socket
    
      /**
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Wed Dec 20 23:27:07 UTC 2023
    - 4.3K bytes
    - Viewed (0)
Back to top