Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 114 for intercept (0.18 sec)

  1. okhttp/src/main/kotlin/okhttp3/internal/http/BridgeInterceptor.kt

     * request. Then it proceeds to call the network. Finally it builds a user response from the network
     * response.
     */
    class BridgeInterceptor(private val cookieJar: CookieJar) : Interceptor {
      @Throws(IOException::class)
      override fun intercept(chain: Interceptor.Chain): Response {
        val userRequest = chain.request()
        val requestBuilder = userRequest.newBuilder()
    
        val body = userRequest.body
        if (body != null) {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 4.2K bytes
    - Viewed (2)
  2. okhttp/src/main/kotlin/okhttp3/internal/cache/CacheInterceptor.kt

    import okio.Source
    import okio.Timeout
    import okio.buffer
    
    /** Serves requests from the cache and writes responses to the cache. */
    class CacheInterceptor(internal val cache: Cache?) : Interceptor {
      @Throws(IOException::class)
      override fun intercept(chain: Interceptor.Chain): Response {
        val call = chain.call()
        val cacheCandidate = cache?.get(chain.request().requestForCache())
    
        val now = System.currentTimeMillis()
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Fri Mar 22 07:09:21 GMT 2024
    - 10.2K bytes
    - Viewed (0)
  3. docs/en/docs/tutorial/cors.md

    The middleware responds to two particular types of HTTP request...
    
    ### CORS preflight requests
    
    These are any `OPTIONS` request with `Origin` and `Access-Control-Request-Method` headers.
    
    In this case the middleware will intercept the incoming request and respond with appropriate CORS headers, and either a `200` or `400` response for informational purposes.
    
    ### Simple requests
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sun Nov 13 20:28:37 GMT 2022
    - 5.1K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/internal/http/RetryAndFollowUpInterceptor.kt

    import okhttp3.internal.withSuppressed
    
    /**
     * This interceptor recovers from failures and follows redirects as necessary. It may throw an
     * [IOException] if the call was canceled.
     */
    class RetryAndFollowUpInterceptor(private val client: OkHttpClient) : Interceptor {
      @Throws(IOException::class)
      override fun intercept(chain: Interceptor.Chain): Response {
        val realChain = chain as RealInterceptorChain
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 15 13:24:48 GMT 2024
    - 12.1K bytes
    - Viewed (4)
  5. okhttp-logging-interceptor/src/main/kotlin/okhttp3/logging/HttpLoggingInterceptor.kt

     *
     * The format of the logs created by this class should not be considered stable and may
     * change slightly between releases. If you need a stable logging format, use your own interceptor.
     */
    class HttpLoggingInterceptor
      @JvmOverloads
      constructor(
        private val logger: Logger = Logger.DEFAULT,
      ) : Interceptor {
    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)
  6. okhttp-android/src/main/baseline-prof.txt

    HSPLokhttp3/internal/http/BridgeInterceptor;-><init>(Lokhttp3/CookieJar;)V
    HSPLokhttp3/internal/http/BridgeInterceptor;->intercept(Lokhttp3/Interceptor$Chain;)Lokhttp3/Response;
    HSPLokhttp3/internal/http/CallServerInterceptor;-><init>(Z)V
    HSPLokhttp3/internal/http/CallServerInterceptor;->intercept(Lokhttp3/Interceptor$Chain;)Lokhttp3/Response;
    HSPLokhttp3/internal/http/HttpHeaders;-><clinit>()V
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Mar 21 11:22:00 GMT 2022
    - 127.9K bytes
    - Viewed (0)
  7. okhttp-logging-interceptor/src/test/java/okhttp3/logging/HttpLoggingInterceptorTest.kt

      private var extraNetworkInterceptor: Interceptor? = null
    
      private fun setLevel(level: Level) {
        networkInterceptor.setLevel(level)
        applicationInterceptor.setLevel(level)
      }
    
      @BeforeEach
      fun setUp(server: MockWebServer) {
        this.server = server
        client =
          OkHttpClient.Builder()
            .addNetworkInterceptor(
              Interceptor { chain ->
                when {
    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)
  8. okhttp/src/test/java/okhttp3/KotlinSourceModernTest.kt

        builder = builder.encodedFragment("")
        val httpUrl: HttpUrl = builder.build()
      }
    
      @Test
      fun interceptor() {
        var interceptor: Interceptor = Interceptor { TODO() }
        interceptor = Interceptor { it: Interceptor.Chain -> TODO() }
      }
    
      @Test
      fun interceptorChain() {
        val chain: Interceptor.Chain = newInterceptorChain()
      }
    
      @Test
      fun handshakeCertificates() {
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 01 14:21:25 GMT 2024
    - 46.5K bytes
    - Viewed (4)
  9. okhttp/src/test/java/okhttp3/internal/http2/HttpOverHttp2Test.kt

        )
        server.enqueue(MockResponse(body = "DEF"))
        val client2 =
          client.newBuilder()
            .addNetworkInterceptor(
              object : Interceptor {
                var executedCall = false
    
                override fun intercept(chain: Interceptor.Chain): Response {
                  if (!executedCall) {
                    // At this point, we have a healthy HTTP/2 connection. This call will trigger the
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Thu Apr 11 22:09:35 GMT 2024
    - 75.3K bytes
    - Viewed (0)
  10. okhttp/api/okhttp.api

    	public final fun parse (Ljava/lang/String;)Lokhttp3/HttpUrl;
    }
    
    public abstract interface class okhttp3/Interceptor {
    	public static final field Companion Lokhttp3/Interceptor$Companion;
    	public abstract fun intercept (Lokhttp3/Interceptor$Chain;)Lokhttp3/Response;
    }
    
    public abstract interface class okhttp3/Interceptor$Chain {
    	public abstract fun call ()Lokhttp3/Call;
    	public abstract fun connectTimeoutMillis ()I
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Apr 15 13:41:01 GMT 2024
    - 70.2K bytes
    - Viewed (0)
Back to top