Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 60 for object (0.27 sec)

  1. okhttp/src/test/java/okhttp3/internal/http2/HttpOverHttp2Test.kt

        val postBytes = "FGHIJ".toByteArray()
        server.enqueue(MockResponse(body = "ABCDE"))
        val call =
          client.newCall(
            Request(
              url = server.url("/foo"),
              body =
                object : RequestBody() {
                  override fun contentType(): MediaType = "text/plain; charset=utf-8".toMediaType()
    
                  override fun writeTo(sink: BufferedSink) {
                    sink.write(postBytes)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 11 22:09:35 GMT 2024
    - 75.3K bytes
    - Viewed (0)
  2. okhttp-dnsoverhttps/src/test/java/okhttp3/dnsoverhttps/DnsOverHttpsTest.kt

        return DnsOverHttps.Builder().client(bootstrapClient)
          .includeIPv6(includeIPv6)
          .resolvePrivateAddresses(true)
          .url(url)
          .post(post)
          .build()
      }
    
      companion object {
        private fun address(host: String) = InetAddress.getByName(host)
      }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 10 19:46:48 GMT 2024
    - 11K bytes
    - Viewed (0)
  3. okhttp/src/main/kotlin/okhttp3/internal/cache/CacheInterceptor.kt

        val cacheBodyUnbuffered = cacheRequest.body()
    
        val source = response.body.source()
        val cacheBody = cacheBodyUnbuffered.buffer()
    
        val cacheWritingSource =
          object : Source {
            private var cacheRequestClosed = false
    
            @Throws(IOException::class)
            override fun read(
              sink: Buffer,
              byteCount: Long,
            ): Long {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Fri Mar 22 07:09:21 GMT 2024
    - 10.2K bytes
    - Viewed (0)
  4. container-tests/src/test/java/okhttp3/containers/BasicMockServerTest.kt

          val response = client.newCall(Request((mockServer.secureEndpoint + "/person?name=peter").toHttpUrl())).execute()
    
          assertThat(response.body.string()).contains("Peter the person")
        }
      }
    
      companion object {
        val MOCKSERVER_IMAGE: DockerImageName =
          DockerImageName
            .parse("mockserver/mockserver")
            .withTag("mockserver-5.15.0")
    
        fun OkHttpClient.Builder.trustMockServer(): OkHttpClient.Builder =
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Fri Apr 05 03:30:42 GMT 2024
    - 3.3K bytes
    - Viewed (0)
  5. okhttp/src/main/kotlin/okhttp3/Request.kt

      /** Returns the tag attached with [type] as a key, or null if no tag is attached with that key. */
      fun <T : Any> tag(type: KClass<T>): T? = type.java.cast(tags[type])
    
      /**
       * Returns the tag attached with `Object.class` as a key, or null if no tag is attached with
       * that key.
       *
       * Prior to OkHttp 3.11, this method never returned null if no tag was attached. Instead it
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 06 04:17:44 GMT 2024
    - 10.5K bytes
    - Viewed (0)
  6. okhttp/src/main/kotlin/okhttp3/internal/connection/ConnectPlan.kt

          connectionSpecIndex = connectionSpecIndex,
          isTlsFallback = isTlsFallback,
        )
      }
    
      fun closeQuietly() {
        socket?.closeQuietly()
      }
    
      companion object {
        private const val NPE_THROW_WITH_NULL = "throw with null exception"
        private const val MAX_TUNNEL_ATTEMPTS = 21
      }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 20 17:03:43 GMT 2024
    - 18.6K bytes
    - Viewed (0)
  7. okhttp/src/test/java/okhttp3/internal/ws/RealWebSocketTest.kt

                responseHeaders,
              ),
              RealWebSocket.DEFAULT_MINIMUM_DEFLATE_SIZE,
              webSocketCloseTimeout,
            ).apply {
              if (client) {
                call =
                  object : FailingCall() {
                    override fun cancel() {
                      ******@****.***()
                    }
                  }
              }
            }
          webSocket!!.initReaderAndWriter(name, this)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 11 01:59:58 GMT 2024
    - 18.5K bytes
    - Viewed (0)
  8. okhttp/src/test/java/okhttp3/KotlinSourceModernTest.kt

        builder = builder.noTransform()
        builder = builder.immutable()
        val cacheControl: CacheControl = builder.build()
      }
    
      @Test
      fun call() {
        val call: Call =
          object : Call {
            override fun request(): Request = TODO()
    
            override fun execute(): Response = TODO()
    
            override fun enqueue(responseCallback: Callback) = TODO()
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 01 14:21:25 GMT 2024
    - 46.5K bytes
    - Viewed (4)
  9. okhttp-coroutines/src/test/kotlin/okhttp3/SuspendCallTest.kt

            .protocol(Protocol.HTTP_1_1)
            .message("OK")
            .code(200)
            .body(
              object : ResponseBody() {
                override fun contentType() = null
    
                override fun contentLength() = -1L
    
                override fun source() =
                  object : ForwardingSource(Buffer()) {
                    override fun close() {
                      responseClosed = true
                    }
    Plain Text
    - Registered: Fri Apr 12 11:42:09 GMT 2024
    - Last Modified: Fri Apr 05 11:25:23 GMT 2024
    - 5.3K bytes
    - Viewed (0)
  10. okhttp/src/main/kotlin/okhttp3/CacheControl.kt

          val minFreshSecondsLong = timeUnit.toSeconds(minFresh.toLong())
          this.minFreshSeconds = minFreshSecondsLong.commonClampToInt()
        }
    
        fun build(): CacheControl = commonBuild()
      }
    
      companion object {
        /**
         * Cache control request directives that require network validation of responses. Note that such
         * requests may be assisted by the cache via conditional GET requests.
         */
        @JvmField
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 15 13:41:01 GMT 2024
    - 10K bytes
    - Viewed (0)
Back to top