Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for stripBody (0.18 sec)

  1. okhttp-sse/src/main/kotlin/okhttp3/sse/internal/RealEventSource.kt

     */
    package okhttp3.sse.internal
    
    import java.io.IOException
    import okhttp3.Call
    import okhttp3.Callback
    import okhttp3.Request
    import okhttp3.Response
    import okhttp3.ResponseBody
    import okhttp3.internal.stripBody
    import okhttp3.sse.EventSource
    import okhttp3.sse.EventSourceListener
    
    internal class RealEventSource(
      private val request: Request,
      private val listener: EventSourceListener,
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.2K bytes
    - Viewed (0)
  2. okhttp/src/main/kotlin/okhttp3/internal/http/CallServerInterceptor.kt

    import java.net.ProtocolException
    import okhttp3.Interceptor
    import okhttp3.Response
    import okhttp3.internal.connection.Exchange
    import okhttp3.internal.http2.ConnectionShutdownException
    import okhttp3.internal.stripBody
    import okio.buffer
    
    /** This is the last interceptor in the chain. It makes a network call to the server. */
    class CallServerInterceptor(private val forWebSocket: Boolean) : Interceptor {
      @Throws(IOException::class)
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 6.3K bytes
    - Viewed (1)
  3. okhttp/src/main/kotlin/okhttp3/internal/-ResponseCommon.kt

          """.trimMargin(),
        )
      }
    
      override fun timeout() = Timeout.NONE
    
      override fun close() {
      }
    }
    
    fun Response.stripBody(): Response {
      return newBuilder()
        .body(UnreadableResponseBody(body.contentType(), body.contentLength()))
        .build()
    }
    
    val Response.commonIsSuccessful: Boolean
      get() = code in 200..299
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 15 13:24:48 GMT 2024
    - 5.2K bytes
    - Viewed (0)
Back to top