Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for http2ErrorCode (0.1 sec)

  1. mockwebserver/src/main/kotlin/mockwebserver3/SocketPolicy.kt

      /**
       * Process the response without even attempting to reading the request body. For HTTP/2 this will
       * send [http2ErrorCode] after the response body or trailers. For HTTP/1 this will close the
       * socket after the response body or trailers.
       */
      class DoNotReadRequestBody(
        val http2ErrorCode: Int = 0,
      ) : SocketPolicy
    
      /** Don't trust the client during the SSL handshake. */
      object FailHandshake : SocketPolicy
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Tue Jan 23 14:31:42 UTC 2024
    - 4.6K bytes
    - Viewed (0)
  2. mockwebserver-deprecated/src/main/kotlin/okhttp3/mockwebserver/MockResponse.kt

      @Deprecated(
        message = "moved to var",
        replaceWith = ReplaceWith(expression = "http2ErrorCode"),
        level = DeprecationLevel.ERROR,
      )
      fun getHttp2ErrorCode(): Int = http2ErrorCode
    
      fun setHttp2ErrorCode(http2ErrorCode: Int) =
        apply {
          this.http2ErrorCode = http2ErrorCode
        }
    
      fun throttleBody(
        bytesPerPeriod: Long,
        period: Long,
        unit: TimeUnit,
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 7.2K bytes
    - Viewed (0)
  3. mockwebserver-deprecated/src/test/java/okhttp3/mockwebserver/KotlinSourceModernTest.kt

        mockResponse = mockResponse.setChunkedBody("", 0)
        var socketPolicy: SocketPolicy = mockResponse.socketPolicy
        mockResponse.socketPolicy = SocketPolicy.KEEP_OPEN
        var http2ErrorCode: Int = mockResponse.http2ErrorCode
        mockResponse.http2ErrorCode = 0
        mockResponse = mockResponse.throttleBody(0L, 0L, TimeUnit.SECONDS)
        var throttleBytesPerPeriod: Long = mockResponse.throttleBytesPerPeriod
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 7.3K bytes
    - Viewed (0)
  4. mockwebserver-deprecated/src/main/kotlin/okhttp3/mockwebserver/DeprecationBridge.kt

        SocketPolicy.FAIL_HANDSHAKE -> FailHandshake
        SocketPolicy.SHUTDOWN_INPUT_AT_END -> ShutdownInputAtEnd
        SocketPolicy.SHUTDOWN_OUTPUT_AT_END -> ShutdownOutputAtEnd
        SocketPolicy.STALL_SOCKET_AT_START -> StallSocketAtStart
        SocketPolicy.NO_RESPONSE -> NoResponse
        SocketPolicy.RESET_STREAM_AT_START -> ResetStreamAtStart(http2ErrorCode)
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 4.6K bytes
    - Viewed (0)
  5. docs/changelogs/upgrading_to_okhttp_4.md

       encodedUsername, fragment, host, password, pathSegments, pathSize, port, query,
       queryParameterNames, querySize, scheme, username
     * **MockResponse**: headers, http2ErrorCode, socketPolicy, status, trailers
     * **MockWebServer**: bodyLimit, port, protocolNegotiationEnabled, protocols, requestCount,
       serverSocketFactory
     * **MultipartBody.Part**: body, headers
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sun Feb 06 16:58:16 UTC 2022
    - 10.9K bytes
    - Viewed (0)
  6. okhttp/src/test/java/okhttp3/KotlinSourceModernTest.kt

        mockResponse = mockResponse.setChunkedBody("", 0)
        var socketPolicy: SocketPolicy = mockResponse.socketPolicy
        mockResponse.socketPolicy = SocketPolicy.KEEP_OPEN
        var http2ErrorCode: Int = mockResponse.http2ErrorCode
        mockResponse.http2ErrorCode = 0
        mockResponse = mockResponse.throttleBody(0L, 0L, TimeUnit.SECONDS)
        var throttleBytesPerPeriod: Long = mockResponse.throttleBytesPerPeriod
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Apr 01 14:21:25 UTC 2024
    - 46.5K bytes
    - Viewed (0)
  7. mockwebserver-deprecated/api/mockwebserver.api

    	public final fun getTrailers ()Lokhttp3/Headers;
    	public final fun getWebSocketListener ()Lokhttp3/WebSocketListener;
    	public final fun headers (Lokhttp3/Headers;)V
    	public final fun http2ErrorCode (I)V
    	public final fun removeHeader (Ljava/lang/String;)Lokhttp3/mockwebserver/MockResponse;
    	public final fun setBody (Ljava/lang/String;)Lokhttp3/mockwebserver/MockResponse;
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sat Jul 22 12:28:51 UTC 2023
    - 10.2K bytes
    - Viewed (0)
  8. mockwebserver/src/main/kotlin/mockwebserver3/MockWebServer.kt

          if (peekedResponse.socketPolicy is ResetStreamAtStart) {
            dispatchBookkeepingRequest(sequenceNumber.getAndIncrement(), socket)
            stream.close(ErrorCode.fromHttp2(peekedResponse.socketPolicy.http2ErrorCode)!!, null)
            return
          }
    
          val request = readRequest(stream)
          atomicRequestCount.incrementAndGet()
          requestQueue.add(request)
          if (request.failure != null) {
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sun Mar 31 17:16:15 UTC 2024
    - 37.4K bytes
    - Viewed (0)
  9. okhttp/src/test/java/okhttp3/KotlinDeprecationErrorTest.kt

        var headers: Headers = mockResponse.getHeaders()
        var trailers: Headers = mockResponse.getTrailers()
        var socketPolicy: SocketPolicy = mockResponse.getSocketPolicy()
        var http2ErrorCode: Int = mockResponse.getHttp2ErrorCode()
      }
    
      @Test @Disabled
      fun mockWebServer() {
        val mockWebServer = MockWebServer()
        var port: Int = mockWebServer.getPort()
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 13.3K bytes
    - Viewed (0)
Back to top