Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 78 for add2 (0.13 sec)

  1. mockwebserver/src/main/kotlin/mockwebserver3/MockResponse.kt

          }
    
        /**
         * Adds [header] as an HTTP header. For well-formed HTTP [header] should contain a name followed
         * by a colon and a value.
         */
        fun addHeader(header: String) =
          apply {
            headers.add(header)
          }
    
        /**
         * Adds a new header with the name and value. This may be used to add multiple headers with the
         * same name.
         */
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Jan 23 14:31:42 GMT 2024
    - 13.3K bytes
    - Viewed (1)
  2. okhttp/src/main/kotlin/okhttp3/Headers.kt

         * Adds all headers from an existing collection.
         */
        fun addAll(headers: Headers) = commonAddAll(headers)
    
        /**
         * Add a header with the specified name and formatted date. Does validation of header names and
         * value.
         */
        fun add(
          name: String,
          value: Date,
        ) = add(name, value.toHttpDateString())
    
        /**
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 11.5K bytes
    - Viewed (0)
  3. okhttp/src/main/kotlin/okhttp3/internal/concurrent/TaskQueue.kt

        val latch = CountDownLatch(1)
    
        override fun runOnce(): Long {
          latch.countDown()
          return -1L
        }
      }
    
      /** Adds [task] to run in [delayNanos]. Returns true if the coordinator is impacted. */
      internal fun scheduleAndDecide(
        task: Task,
        delayNanos: Long,
        recurrence: Boolean,
      ): Boolean {
        task.initQueue(this)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 7.5K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/Response.kt

         * with that name, they are all replaced.
         */
        open fun header(
          name: String,
          value: String,
        ) = commonHeader(name, value)
    
        /**
         * Adds a header with [name] to [value]. Prefer this method for multiply-valued
         * headers like "Set-Cookie".
         */
        open fun addHeader(
          name: String,
          value: String,
        ) = commonAddHeader(name, value)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Jan 23 14:31:42 GMT 2024
    - 15.5K bytes
    - Viewed (0)
  5. okhttp/src/test/java/okhttp3/HeadersTest.kt

        val headers =
          Headers.Builder()
            .add("A", "a")
            .add("B", "bb")
            .build()
        assertThat(headers.toString()).isEqualTo("A: a\nB: bb\n")
      }
    
      @Test fun headersToStringRedactsSensitiveHeaders() {
        val headers =
          Headers.Builder()
            .add("content-length", "99")
            .add("authorization", "peanutbutter")
            .add("proxy-authorization", "chocolate")
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 8.6K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/CertificatePinnerKotlinTest.kt

          CertificatePinner.Builder()
            .add("example.com", "sha1/" + certA1.certificate.sha1Hash().base64())
            .build()
    
        certificatePinner.check("example.com", listOf(certA1.certificate))
      }
    
      @Test fun successfulFindMatchingPins() {
        val certificatePinner =
          CertificatePinner.Builder()
            .add("first.com", certA1Sha256Pin, certB1Sha256Pin)
            .add("second.com", certC1Sha256Pin)
            .build()
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 8.1K bytes
    - Viewed (0)
  7. okhttp/src/test/java/okhttp3/internal/ws/WebSocketRecorder.kt

            events.add(Message(string = text))
          }
    
          override fun onReadMessage(bytes: ByteString) {
            events.add(Message(bytes = bytes))
          }
    
          override fun onReadPing(payload: ByteString) {
            events.add(Ping(payload))
          }
    
          override fun onReadPong(payload: ByteString) {
            events.add(Pong(payload))
          }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 6.9K bytes
    - Viewed (0)
  8. okhttp/src/test/java/okhttp3/internal/connection/RouteSelectorTest.kt

        assertThat(routeSelector.hasNext()).isFalse()
      }
    
      @Test fun proxyDnsFailureContinuesToNextProxy() {
        val address = factory.newAddress()
        proxySelector.proxies.add(proxyA)
        proxySelector.proxies.add(proxyB)
        proxySelector.proxies.add(proxyA)
        val routeSelector = newRouteSelector(address)
        proxySelector.assertRequests(address.url.toUri())
        assertThat(routeSelector.hasNext()).isTrue()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Mar 06 17:33:38 GMT 2024
    - 20.8K bytes
    - Viewed (0)
  9. okhttp-tls/src/main/kotlin/okhttp3/tls/HeldCertificate.kt

        fun duration(
          duration: Long,
          unit: TimeUnit,
        ) = apply {
          val now = System.currentTimeMillis()
          validityInterval(now, now + unit.toMillis(duration))
        }
    
        /**
         * Adds a subject alternative name (SAN) to the certificate. This is usually a literal hostname,
         * a literal IP address, or a hostname pattern. If no subject alternative names are added that
         * extension will be omitted.
         */
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 21.6K bytes
    - Viewed (1)
  10. okhttp/src/main/kotlin/okhttp3/CertificatePinner.kt

     *
     * ```java
     * CertificatePinner certificatePinner = new CertificatePinner.Builder()
     *     .add("publicobject.com", "sha256/afwiKY3RxoMmLkuRW1l7QsPZTJPwDS2pdDROQjXw8ig=")
     *     .add("publicobject.com", "sha256/klO23nT2ehFDXCfx3eHTDRESMz3asj1muO+4aIdjiuY=")
     *     .add("publicobject.com", "sha256/grX4Ta9HpZx6tSHkmCrvpApTQGo67CYDnvprLg5yRME=")
     *     .add("publicobject.com", "sha256/lCppFqbkrlJ3EcVFAkeip0+44VaoJUymbnOaEUk7tEU=")
     *     .build();
     * ```
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 14.2K bytes
    - Viewed (1)
Back to top