Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 26 for status (0.14 sec)

  1. mockwebserver/README.md

    }
    ```
    
    Your unit tests might move the `server` into a field so you can shut it down
    from your test's `tearDown()`.
    
    ### API
    
    #### MockResponse
    
    Mock responses default to an empty response body and a `200` status code.
    You can set a custom body with a string, input stream or byte array. Also
    add headers with a fluent builder API.
    
    ```java
    MockResponse response = new MockResponse()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Sun Dec 17 15:34:10 GMT 2023
    - 5K bytes
    - Viewed (1)
  2. okhttp/src/main/kotlin/okhttp3/internal/http/StatusLine.kt

              throw ProtocolException("Unexpected status line: $statusLine")
            }
            val httpMinorVersion = statusLine[7] - '0'
            codeStart = 9
            protocol =
              when (httpMinorVersion) {
                0 -> Protocol.HTTP_1_0
                1 -> Protocol.HTTP_1_1
                else -> throw ProtocolException("Unexpected status line: $statusLine")
              }
    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)
  3. okhttp/src/main/kotlin/okhttp3/internal/http2/Header.kt

        @JvmField val PSEUDO_PREFIX: ByteString = ":".encodeUtf8()
    
        const val RESPONSE_STATUS_UTF8 = ":status"
        const val TARGET_METHOD_UTF8 = ":method"
        const val TARGET_PATH_UTF8 = ":path"
        const val TARGET_SCHEME_UTF8 = ":scheme"
        const val TARGET_AUTHORITY_UTF8 = ":authority"
    
        @JvmField val RESPONSE_STATUS: ByteString = RESPONSE_STATUS_UTF8.encodeUtf8()
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2K bytes
    - Viewed (0)
  4. mockwebserver-deprecated/src/main/kotlin/okhttp3/mockwebserver/MockResponse.kt

      }
    
      @JvmName("-deprecated_getStatus")
      @Deprecated(
        message = "moved to var",
        replaceWith = ReplaceWith(expression = "status"),
        level = DeprecationLevel.ERROR,
      )
      fun getStatus(): String = status
    
      fun setStatus(status: String) =
        apply {
          this.status = status
        }
    
      fun setResponseCode(code: Int): MockResponse {
        val reason =
          when (code) {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 7.2K bytes
    - Viewed (0)
  5. native-image-tests/src/main/kotlin/okhttp3/DotListener.kt

        testExecutionResult: TestExecutionResult,
      ) {
        if (!testIdentifier.isContainer) {
          when (testExecutionResult.status!!) {
            TestExecutionResult.Status.ABORTED -> printStatus("-")
            TestExecutionResult.Status.FAILED -> printStatus("F")
            TestExecutionResult.Status.SUCCESSFUL -> printStatus(".")
          }
        }
      }
    
      override fun testPlanExecutionFinished(testPlan: TestPlan) {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.2K bytes
    - Viewed (0)
  6. okhttp/src/main/kotlin/okhttp3/internal/http/HttpHeaders.kt

      val cookies = Cookie.parseAll(url, headers)
      if (cookies.isEmpty()) return
    
      saveFromResponse(url, cookies)
    }
    
    /**
     * Returns true if the response headers and status indicate that this response has a (possibly
     * 0-length) body. See RFC 7231.
     */
    fun Response.promisesBody(): Boolean {
      // HEAD requests never yield a body regardless of the response headers.
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 7.2K bytes
    - Viewed (0)
  7. okhttp/src/main/kotlin/okhttp3/internal/http/RequestLine.kt

     */
    package okhttp3.internal.http
    
    import java.net.HttpURLConnection
    import java.net.Proxy
    import okhttp3.HttpUrl
    import okhttp3.Request
    
    object RequestLine {
      /**
       * Returns the request status line, like "GET / HTTP/1.1". This is exposed to the application by
       * [HttpURLConnection.getHeaderFields], so it needs to be set even if the transport is
       * HTTP/2.
       */
      fun get(
        request: Request,
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2K bytes
    - Viewed (0)
  8. okhttp/src/main/kotlin/okhttp3/internal/http/HttpStatusCodes.kt

     * individuals on behalf of the Apache Software Foundation.  For more
     * information on the Apache Software Foundation, please see
     * <http://www.apache.org/>.
     */
    
    package okhttp3.internal.http
    
    // HTTP Status Codes not offered by HttpUrlConnection.
    //
    // https://datatracker.ietf.org/doc/html/rfc7231#page-47
    //
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 15 13:24:48 GMT 2024
    - 1.9K bytes
    - Viewed (0)
  9. 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)
  10. mockwebserver-deprecated/src/main/kotlin/okhttp3/mockwebserver/DeprecationBridge.kt

      }
    
      val body = getBody()
      if (body != null) result.body(body)
    
      for (pushPromise in pushPromises) {
        result.addPush(pushPromise.wrap())
      }
    
      result.settings(settings)
      result.status = status
      result.headers(headers)
      result.trailers(trailers)
      result.socketPolicy =
        when (socketPolicy) {
          SocketPolicy.EXPECT_CONTINUE, SocketPolicy.CONTINUE_ALWAYS -> {
            result.add100Continue()
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 4.6K bytes
    - Viewed (0)
Back to top