Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 30 for OK (0.13 sec)

  1. okhttp-logging-interceptor/src/main/kotlin/okhttp3/logging/HttpLoggingInterceptor.kt

          /** No logs. */
          NONE,
    
          /**
           * Logs request and response lines.
           *
           * Example:
           * ```
           * --> POST /greeting http/1.1 (3-byte body)
           *
           * <-- 200 OK (22ms, 6-byte body)
           * ```
           */
          BASIC,
    
          /**
           * Logs request and response lines and their respective headers.
           *
           * Example:
           * ```
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 06 09:14:38 GMT 2024
    - 11.2K bytes
    - Viewed (1)
  2. okhttp/src/test/java/okhttp3/URLConnectionTest.kt

          MockResponse.Builder()
            .status("HTP/1.1 200 OK")
            .build(),
        )
        val request = newRequest("/")
        assertFailsWith<IOException> {
          getResponse(request)
        }
      }
    
      @Test
      fun serverSendsInvalidCodeTooLarge() {
        server.enqueue(
          MockResponse.Builder()
            .status("HTTP/1.1 2147483648 OK")
            .build(),
        )
        val request = newRequest("/")
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Jan 20 10:30:28 GMT 2024
    - 131.7K bytes
    - Viewed (0)
  3. okhttp-logging-interceptor/src/test/java/okhttp3/logging/HttpLoggingInterceptorTest.kt

        applicationLogs
          .assertLogEqual("--> GET $url")
          .assertLogMatch(Regex("""<-- 200 OK $url \(\d+ms, 0-byte body\)"""))
          .assertNoMoreLogs()
        networkLogs
          .assertLogEqual("--> GET $url http/1.1")
          .assertLogMatch(Regex("""<-- 200 OK $url \(\d+ms, 0-byte body\)"""))
          .assertNoMoreLogs()
      }
    
      @Test
      fun basicPost() {
        setLevel(Level.BASIC)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sat Apr 06 09:14:38 GMT 2024
    - 37.6K bytes
    - Viewed (0)
  4. mockwebserver-deprecated/src/test/java/okhttp3/mockwebserver/MockWebServerTest.kt

        assertThat(headersToList(response)).containsExactly("Content-Length: 0")
        assertThat(response.status).isEqualTo("HTTP/1.1 200 OK")
      }
    
      @Test
      fun setResponseMockReason() {
        val reasons =
          arrayOf(
            "Mock Response",
            "Informational",
            "OK",
            "Redirection",
            "Client Error",
            "Server Error",
            "Mock Response",
          )
        for (i in 0..599) {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 21.9K bytes
    - Viewed (0)
  5. okhttp/src/main/kotlin/okhttp3/internal/http/StatusLine.kt

     *
     */
    package okhttp3.internal.http
    
    import java.net.ProtocolException
    import okhttp3.Protocol
    import okhttp3.Response
    import okio.IOException
    
    /** An HTTP response status line like "HTTP/1.1 200 OK". */
    class StatusLine(
      @JvmField val protocol: Protocol,
      @JvmField val code: Int,
      @JvmField val message: String,
    ) {
      override fun toString(): String {
        return buildString {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Tue Jan 09 12:33:05 GMT 2024
    - 3.3K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/internal/http/StatusLineTest.kt

        assertInvalid("HTTP/2.1 200 OK")
        assertInvalid("HTTP/-.1 200 OK")
        assertInvalid("HTTP/1.- 200 OK")
        assertInvalid("HTTP/0.1 200 OK")
        assertInvalid("HTTP/101 200 OK")
        assertInvalid("HTTP/1.1_200 OK")
      }
    
      @Test
      fun nonThreeDigitCode() {
        assertInvalid("HTTP/1.1  OK")
        assertInvalid("HTTP/1.1 2 OK")
        assertInvalid("HTTP/1.1 20 OK")
        assertInvalid("HTTP/1.1 2000 OK")
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.5K bytes
    - Viewed (0)
  7. mockwebserver/src/main/kotlin/mockwebserver3/MockResponse.kt

    import okhttp3.internal.http2.Settings
    import okio.Buffer
    
    /** A scripted response to be replayed by the mock web server. */
    @ExperimentalOkHttpApi
    class MockResponse {
      /** Returns the HTTP response line, such as "HTTP/1.1 200 OK". */
      val status: String
    
      val code: Int
        get() {
          val statusParts = status.split(' ', limit = 3)
          require(statusParts.size >= 2) { "Unexpected status: $status" }
          return statusParts[1].toInt()
    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)
  8. okhttp/src/test/java/okhttp3/HeadersRequestTest.kt

    import org.junit.jupiter.api.Test
    
    class HeadersRequestTest {
      @Test fun readNameValueBlockDropsForbiddenHeadersHttp2() {
        val headerBlock =
          headersOf(
            ":status",
            "200 OK",
            ":version",
            "HTTP/1.1",
            "connection",
            "close",
          )
        val request = Request.Builder().url("http://square.com/").build()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.5K bytes
    - Viewed (0)
  9. okhttp/src/test/java/okhttp3/CallTest.kt

          MockResponse.Builder()
            .status("HTP/1.1 200 OK")
            .build(),
        )
        executeSynchronously("/")
          .assertFailure("Unexpected status line: HTP/1.1 200 OK")
      }
    
      @Test
      fun serverSendsInvalidCodeTooLarge() {
        server.enqueue(
          MockResponse.Builder()
            .status("HTTP/1.1 2147483648 OK")
            .build(),
        )
        executeSynchronously("/")
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 10 19:46:48 GMT 2024
    - 142.5K bytes
    - Viewed (0)
  10. okhttp/src/main/kotlin/okhttp3/Cache.kt

         * Accept-Charset: UTF-8
         * HTTP/1.1 200 OK
         * 3
         * Content-Type: image/png
         * Content-Length: 100
         * Cache-Control: max-age=600
         * ```
         *
         * A typical HTTPS file looks like this:
         *
         * ```
         * https://google.com/foo
         * GET
         * 2
         * Accept-Language: fr-CA
         * Accept-Charset: UTF-8
         * HTTP/1.1 200 OK
         * 3
         * Content-Type: image/png
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Wed Apr 10 19:46:48 GMT 2024
    - 26.8K bytes
    - Viewed (0)
Back to top