Search Options

Results per page
Sort
Preferred Languages
Advance

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

  1. okhttp/src/main/kotlin/okhttp3/internal/http/StatusLine.kt

      @JvmField val code: Int,
      @JvmField val message: String,
    ) {
      override fun toString(): String {
        return buildString {
          if (protocol == Protocol.HTTP_1_0) {
            append("HTTP/1.0")
          } else {
            append("HTTP/1.1")
          }
          append(' ').append(code)
          append(' ').append(message)
        }
      }
    
      companion object {
        fun get(response: Response): StatusLine {
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Tue Jan 09 12:33:05 UTC 2024
    - 3.3K bytes
    - Viewed (0)
  2. samples/guide/src/main/java/okhttp3/recipes/kt/CertificatePinning.kt

          .certificatePinner(
            CertificatePinner.Builder()
              .add("publicobject.com", "sha256/Vjs8r4z+80wjNcr1YKepWQboSIRi63WsWXhIMN+eWys=")
              .build(),
          )
          .build()
    
      fun run() {
        val request =
          Request.Builder()
            .url("https://publicobject.com/robots.txt")
            .build()
    
        client.newCall(request).execute().use { response ->
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 1.4K bytes
    - Viewed (0)
  3. okhttp/src/main/kotlin/okhttp3/Credentials.kt

    import okio.ByteString.Companion.encode
    
    /** Factory for HTTP authorization credentials. */
    object Credentials {
      /** Returns an auth credential for the Basic scheme. */
      @JvmStatic @JvmOverloads
      fun basic(
        username: String,
        password: String,
        charset: Charset = ISO_8859_1,
      ): String {
        val usernameAndPassword = "$username:$password"
        val encoded = usernameAndPassword.encode(charset).base64()
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 1.1K bytes
    - Viewed (0)
  4. 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)
  5. 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)
  6. 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)
  7. okhttp/src/main/kotlin/okhttp3/TlsVersion.kt

      @JvmName("-deprecated_javaName")
      @Deprecated(
        message = "moved to val",
        replaceWith = ReplaceWith(expression = "javaName"),
        level = DeprecationLevel.ERROR,
      )
      fun javaName(): String = javaName
    
      companion object {
        @JvmStatic
        fun forJavaName(javaName: String): TlsVersion {
          return when (javaName) {
            "TLSv1.3" -> TLS_1_3
            "TLSv1.2" -> TLS_1_2
            "TLSv1.1" -> TLS_1_1
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 1.5K bytes
    - Viewed (0)
  8. okhttp/src/main/kotlin/okhttp3/internal/http2/flowcontrol/WindowCounter.kt

        @Synchronized get() = total - acknowledged
    
      @Synchronized
      fun update(
        total: Long = 0,
        acknowledged: Long = 0,
      ) {
        check(total >= 0)
        check(acknowledged >= 0)
    
        this.total += total
        this.acknowledged += acknowledged
    
        check(this.acknowledged <= this.total)
      }
    
      override fun toString(): String {
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Fri Apr 05 03:30:42 UTC 2024
    - 1.4K bytes
    - Viewed (0)
  9. 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)
  10. samples/tlssurvey/src/main/kotlin/okhttp3/survey/types/SuiteId.kt

     * limitations under the License.
     */
    package okhttp3.survey.types
    
    import okio.ByteString
    
    data class SuiteId(val id: ByteString?, val name: String) {
      fun matches(suiteId: SuiteId): Boolean {
        return id == suiteId.id || name.substring(4) == suiteId.name.substring(4)
      }
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Tue Apr 02 01:44:15 UTC 2024
    - 842 bytes
    - Viewed (0)
Back to top