Search Options

Results per page
Sort
Preferred Languages
Advance

Results 361 - 370 of 527 for Fun (0.01 sec)

  1. samples/guide/src/main/java/okhttp3/recipes/kt/CustomTrust.kt

          OkHttpClient.Builder()
            .sslSocketFactory(certificates.sslSocketFactory(), certificates.trustManager)
            .build()
      }
    
      fun run() {
        showUrl("https://squareup.com/robots.txt")
        showUrl("https://publicobject.com/helloworld.txt")
      }
    
      private fun showUrl(url: String) {
        val request = Builder().url(url).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
    - 8.8K bytes
    - Viewed (0)
  2. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/DerReader.kt

       * longer usable by the current type's members.
       */
      fun <T> withTypeHint(block: () -> T): T {
        typeHintStack.add(null)
        try {
          return block()
        } finally {
          typeHintStack.removeAt(typeHintStack.size - 1)
        }
      }
    
      fun readBoolean(): Boolean {
        if (bytesLeft != 1L) throw ProtocolException("unexpected length: $bytesLeft at $this")
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 10.5K bytes
    - Viewed (0)
  3. mockwebserver-junit5/src/test/java/mockwebserver3/junit5/internal/ExtensionLifecycleTest.kt

      @BeforeEach
      fun beforeEach(server: MockWebServer) {
        instanceServer = server
    
        assertThat(instanceServer).isNotSameInstanceAs(staticServer)
        assertThat(instanceServer).isSameInstanceAs(server)
    
        assertThat(server.started).isTrue()
        server.enqueue(MockResponse())
      }
    
      @AfterEach
      fun afterEach(server: MockWebServer) {
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sun Feb 11 12:12:36 UTC 2024
    - 3K bytes
    - Viewed (0)
  4. okhttp-testing-support/src/main/kotlin/okhttp3/OkHttpDebugLogging.kt

      private val configuredLoggers = CopyOnWriteArraySet<Logger>()
    
      fun enableHttp2() = enable(Http2::class)
    
      fun enableTaskRunner() = enable(TaskRunner::class)
    
      fun logHandler() =
        ConsoleHandler().apply {
          level = Level.FINE
          formatter =
            object : SimpleFormatter() {
              override fun format(record: LogRecord) = String.format("[%1\$tF %1\$tT] %2\$s %n", record.millis, record.message)
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 1.9K bytes
    - Viewed (0)
  5. okhttp/src/test/java/okhttp3/FallbackTestClientSocketFactory.kt

      delegate: SSLSocketFactory,
    ) : DelegatingSSLSocketFactory(delegate) {
      override fun configureSocket(sslSocket: SSLSocket): SSLSocket = TlsFallbackScsvDisabledSSLSocket(sslSocket)
    
      private class TlsFallbackScsvDisabledSSLSocket(
        socket: SSLSocket,
      ) : DelegatingSSLSocket(socket) {
        override fun setEnabledCipherSuites(suites: Array<String>) {
          val enabledCipherSuites = mutableListOf<String>()
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 2K bytes
    - Viewed (0)
  6. mockwebserver-junit4/src/main/kotlin/mockwebserver3/junit4/MockWebServerRule.kt

     * ```
     */
    @ExperimentalOkHttpApi
    class MockWebServerRule : ExternalResource() {
      val server: MockWebServer = MockWebServer()
    
      override fun before() {
        try {
          server.start()
        } catch (e: IOException) {
          throw RuntimeException(e)
        }
      }
    
      override fun after() {
        try {
          server.shutdown()
        } catch (e: IOException) {
          logger.log(Level.WARNING, "MockWebServer shutdown failed", e)
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Tue Jan 23 14:31:42 UTC 2024
    - 1.8K bytes
    - Viewed (0)
  7. samples/guide/src/main/java/okhttp3/recipes/kt/PostForm.kt

    import java.io.IOException
    import okhttp3.FormBody
    import okhttp3.HttpUrl.Companion.toHttpUrl
    import okhttp3.OkHttpClient
    import okhttp3.Request
    
    class PostForm {
      private val client = OkHttpClient()
    
      fun run() {
        val formBody =
          FormBody.Builder()
            .add("search", "Jurassic Park")
            .build()
        val request =
          Request(
            url = "https://en.wikipedia.org/w/index.php".toHttpUrl(),
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 1.3K bytes
    - Viewed (0)
  8. samples/guide/src/main/java/okhttp3/recipes/kt/SynchronousGet.kt

     */
    package okhttp3.recipes.kt
    
    import java.io.IOException
    import okhttp3.OkHttpClient
    import okhttp3.Request
    
    class SynchronousGet {
      private val client = OkHttpClient()
    
      fun run() {
        val request =
          Request.Builder()
            .url("https://publicobject.com/helloworld.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.2K bytes
    - Viewed (0)
  9. mockwebserver-junit5/README.md

      private val server: MockWebServer
    ) {
      @Test
      fun test() {
        ...
      }
    }
    ```
    
    Multiple instances can be obtained by naming additional ones:
    
    ```
    class MyTest(
      private val server: MockWebServer,
      @MockWebServerInstance("server2") private val server2: MockWebServer,
      @MockWebServerInstance("server3") private val server3: MockWebServer
    ) {
      @Test
      fun test() {
        ...
      }
    }
    ```
    
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sun Jan 14 10:20:09 UTC 2024
    - 1.3K bytes
    - Viewed (0)
  10. okhttp/src/main/kotlin/okhttp3/internal/http2/PushObserver.kt

       * @param last when true, there are no data frames to follow.
       */
      @Throws(IOException::class)
      fun onData(
        streamId: Int,
        source: BufferedSource,
        byteCount: Int,
        last: Boolean,
      ): Boolean
    
      /** Indicates the reason why this stream was canceled. */
      fun onReset(
        streamId: Int,
        errorCode: ErrorCode,
      )
    
      companion object {
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 3.6K bytes
    - Viewed (0)
Back to top