Search Options

Results per page
Sort
Preferred Languages
Advance

Results 461 - 470 of 531 for Fun (0.04 sec)

  1. android-test-app/src/androidTest/kotlin/okhttp/android/testapp/PublicSuffixDatabaseTest.kt

    import org.junit.Test
    
    /**
     * Run with "./gradlew :android-test-app:connectedCheck -PandroidBuild=true" and make sure ANDROID_SDK_ROOT is set.
     */
    class PublicSuffixDatabaseTest {
      @Test
      fun testTopLevelDomain() {
        assertThat("https://www.google.com/robots.txt".toHttpUrl().topPrivateDomain()).isEqualTo("google.com")
      }
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 1K bytes
    - Viewed (0)
  2. samples/guide/src/main/java/okhttp3/recipes/kt/PostMultipart.kt

    import okhttp3.MultipartBody
    import okhttp3.OkHttpClient
    import okhttp3.Request
    import okhttp3.RequestBody.Companion.asRequestBody
    
    class PostMultipart {
      private val client = OkHttpClient()
    
      fun run() {
        // Use the imgur image upload API as documented at https://api.imgur.com/endpoints/image
        val requestBody =
          MultipartBody.Builder()
            .setType(MultipartBody.FORM)
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 2.1K bytes
    - Viewed (0)
  3. mockwebserver/src/main/kotlin/mockwebserver3/internal/duplex/RealStream.kt

    internal class RealStream(
      private val http2Stream: Http2Stream,
    ) : Stream {
      override val requestBody = http2Stream.getSource().buffer()
      override val responseBody = http2Stream.getSink().buffer()
    
      override fun cancel() {
        http2Stream.closeLater(ErrorCode.CANCEL)
      }
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Dec 31 18:24:52 UTC 2022
    - 1.1K bytes
    - Viewed (0)
  4. samples/compare/src/test/kotlin/okhttp3/compare/ApacheHttpClientTest.kt

     * Baseline test if we ned to validate OkHttp behaviour against other popular clients.
     */
    class ApacheHttpClientTest {
      private val httpClient = HttpClients.createDefault()
    
      @AfterEach fun tearDown() {
        httpClient.close()
      }
    
      @Test fun get(server: MockWebServer) {
        server.enqueue(
          MockResponse.Builder()
            .body("hello, Apache HttpClient 5.x")
            .build(),
        )
    
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 2.1K bytes
    - Viewed (0)
  5. okhttp/src/main/kotlin/okhttp3/internal/http2/ErrorCode.kt

      CANCEL(8),
    
      COMPRESSION_ERROR(9),
    
      CONNECT_ERROR(0xa),
    
      ENHANCE_YOUR_CALM(0xb),
    
      INADEQUATE_SECURITY(0xc),
    
      HTTP_1_1_REQUIRED(0xd),
      ;
    
      companion object {
        fun fromHttp2(code: Int): ErrorCode? = values().find { it.httpCode == code }
      }
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 1.2K bytes
    - Viewed (0)
  6. mockwebserver/src/main/kotlin/mockwebserver3/internal/SleepNanos.kt

     * See the License for the specific language governing permissions and
     * limitations under the License.
     *
     */
    package mockwebserver3.internal
    
    internal fun sleepNanos(nanos: Long) {
      val ms = nanos / 1_000_000L
      val ns = nanos - (ms * 1_000_000L)
      if (ms > 0L || nanos > 0) {
        Thread.sleep(ms, ns.toInt())
      }
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sun Jan 07 16:05:34 UTC 2024
    - 811 bytes
    - Viewed (0)
  7. okcurl/src/main/kotlin/okhttp3/curl/logging/MessageFormatter.kt

     * limitations under the License.
     */
    package okhttp3.curl.logging
    
    import java.util.logging.LogRecord
    import java.util.logging.SimpleFormatter
    
    object MessageFormatter : SimpleFormatter() {
      override fun format(record: LogRecord): String {
        return String.format("%s%n", record.message)
      }
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Fri Apr 05 03:30:42 UTC 2024
    - 860 bytes
    - Viewed (0)
  8. okhttp/src/main/kotlin/okhttp3/internal/connection/InetAddressOrder.kt

     *  - Async DNS split by IP class
     *  - Stateful handling of connectivity results
     *  - The prioritisation of addresses
     *
     * https://datatracker.ietf.org/doc/html/rfc8305#section-4
     */
    fun reorderForHappyEyeballs(addresses: List<InetAddress>): List<InetAddress> {
      if (addresses.size < 2) {
        return addresses
      }
    
      val (ipv6, ipv4) = addresses.partition { it is Inet6Address }
    
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Wed Dec 20 23:27:07 UTC 2023
    - 1.3K bytes
    - Viewed (0)
  9. okhttp/src/test/java/okhttp3/CacheControlTest.kt

    import assertk.assertions.isFalse
    import assertk.assertions.isTrue
    import kotlin.test.Test
    import kotlin.time.Duration.Companion.seconds
    
    class CacheControlTest {
      @Test
      @Throws(Exception::class)
      fun emptyBuilderIsEmpty() {
        val cacheControl = CacheControl.Builder().build()
        assertThat(cacheControl.toString()).isEqualTo("")
        assertThat(cacheControl.noCache).isFalse()
        assertThat(cacheControl.noStore).isFalse()
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Apr 15 13:41:01 UTC 2024
    - 2.7K bytes
    - Viewed (0)
  10. mockwebserver/src/main/kotlin/mockwebserver3/StreamHandler.kt

     * response data before all request data has been received.
     *
     * See [okhttp3.RequestBody.isDuplex].
     */
    @ExperimentalOkHttpApi
    interface StreamHandler {
      fun handle(stream: Stream)
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Tue Jan 23 14:31:42 UTC 2024
    - 945 bytes
    - Viewed (0)
Back to top