Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 97 for records (0.31 sec)

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

    import okhttp3.internal.closeQuietly
    import okio.Buffer
    import okio.BufferedSource
    import okio.ByteString
    import okio.buffer
    import okio.source
    
    /** Replays prerecorded outgoing frames and records incoming frames.  */
    class MockHttp2Peer : Closeable {
      private var frameCount = 0
      private var client = false
      private val bytesOut = Buffer()
      private var writer = Http2Writer(bytesOut, client)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 11 22:09:35 GMT 2024
    - 8.7K bytes
    - Viewed (0)
  2. okhttp/src/test/java/okhttp3/TestLogHandler.kt

    import org.junit.jupiter.api.extension.ExtensionContext
    import org.junit.rules.TestRule
    import org.junit.runner.Description
    import org.junit.runners.model.Statement
    
    /**
     * A log handler that records which log messages were published so that a calling test can make
     * assertions about them.
     */
    class TestLogHandler(
      private val logger: Logger,
    ) : TestRule, BeforeEachCallback, AfterEachCallback {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.6K bytes
    - Viewed (0)
  3. okhttp/src/test/java/okhttp3/RecordingCallback.kt

     * See the License for the specific language governing permissions and
     * limitations under the License.
     */
    package okhttp3
    
    import java.io.IOException
    import java.util.concurrent.TimeUnit
    
    /**
     * Records received HTTP responses so they can be later retrieved by tests.
     */
    class RecordingCallback : Callback {
      private val responses = mutableListOf<RecordedResponse>()
    
      @Synchronized
      override fun onFailure(
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.1K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/internal/connection/RouteDatabase.kt

      private val _failedRoutes = mutableSetOf<Route>()
    
      val failedRoutes: Set<Route>
        @Synchronized get() = _failedRoutes.toSet()
    
      /** Records a failure connecting to [failedRoute]. */
      @Synchronized fun failed(failedRoute: Route) {
        _failedRoutes.add(failedRoute)
      }
    
      /** Records success connecting to [route]. */
      @Synchronized fun connected(route: Route) {
        _failedRoutes.remove(route)
      }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 15 14:55:09 GMT 2024
    - 1.5K bytes
    - Viewed (0)
  5. okhttp/src/main/kotlin/okhttp3/AsyncDns.kt

     *  * OkHttp DnsOverHttps
     *  * dnsjava Resolver
     *
     * Implementations of this interface must be safe for concurrent use.
     */
    @ExperimentalOkHttpApi
    interface AsyncDns {
      /**
       * Query DNS records for `hostname`, in the order they are received.
       */
      fun query(
        hostname: String,
        callback: Callback,
      )
    
      /**
       * Callback to receive results from the DNS Queries.
       */
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Jan 23 14:31:42 GMT 2024
    - 3.5K bytes
    - Viewed (0)
  6. okhttp-android/src/main/kotlin/okhttp3/android/AndroidAsyncDns.kt

    import java.util.concurrent.Executors
    import okhttp3.AsyncDns
    import okhttp3.ExperimentalOkHttpApi
    
    /**
     * DNS implementation based on android.net.DnsResolver, which submits a request for
     * A or AAAA records, and returns the addresses or exception.
     *
     * Two instances must be used to get all results for an address.
     *
     * @param network network to use, if not selects the default network.
     */
    @RequiresApi(Build.VERSION_CODES.Q)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 01 10:07:48 GMT 2024
    - 2.8K bytes
    - Viewed (0)
  7. samples/compare/src/test/kotlin/okhttp3/compare/JavaHttpClientTest.kt

        val recorded = server.takeRequest()
        assertThat(recorded.headers["Accept"]).isEqualTo("text/plain")
        assertThat(recorded.headers["Accept-Encoding"]).isNull() // No built-in gzip.
        assertThat(recorded.headers["Connection"]).isEqualTo("Upgrade, HTTP2-Settings")
        if (PlatformVersion.majorVersion < 19) {
          assertThat(recorded.headers["Content-Length"]).isEqualTo("0")
        }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.7K bytes
    - Viewed (0)
  8. samples/compare/src/test/kotlin/okhttp3/compare/ApacheHttpClientTest.kt

        }
    
        val recorded = server.takeRequest()
        assertThat(recorded.headers["Accept"]).isEqualTo("text/plain")
        assertThat(recorded.headers["Accept-Encoding"]).isEqualTo("gzip, x-gzip, deflate")
        assertThat(recorded.headers["Connection"]).isEqualTo("keep-alive")
        assertThat(recorded.headers["User-Agent"]!!).startsWith("Apache-HttpClient/")
      }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.1K bytes
    - Viewed (0)
  9. okcurl/src/main/kotlin/okhttp3/curl/Main.kt

        "--connect-timeout",
        help = "Maximum time allowed for connection (seconds)",
      ).int().default(DEFAULT_TIMEOUT)
    
      val readTimeout: Int by option("--read-timeout", help = "Maximum time allowed for reading data (seconds)").int().default(DEFAULT_TIMEOUT)
    
      val callTimeout: Int by option(
        "--call-timeout",
        help = "Maximum time allowed for the entire call (seconds)",
      ).int().default(DEFAULT_TIMEOUT)
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.7K bytes
    - Viewed (1)
  10. samples/guide/src/main/java/okhttp3/recipes/ConfigureTimeouts.java

      public ConfigureTimeouts() throws Exception {
        client = new OkHttpClient.Builder()
            .connectTimeout(5, TimeUnit.SECONDS)
            .writeTimeout(5, TimeUnit.SECONDS)
            .readTimeout(5, TimeUnit.SECONDS)
            .callTimeout(10, TimeUnit.SECONDS)
            .build();
      }
    
      public void run() throws Exception {
        Request request = new Request.Builder()
    Java
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Sep 28 18:00:26 GMT 2019
    - 1.5K bytes
    - Viewed (0)
Back to top