Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 487 for handler (7.95 sec)

  1. src/main/java/org/codelibs/fess/cors/CorsHandlerFactory.java

        public void add(final String origin, final CorsHandler handler) {
            if (logger.isDebugEnabled()) {
                logger.debug("Loaded {}", origin);
            }
            handerMap.put(origin, handler);
        }
    
        public CorsHandler get(final String origin) {
            final CorsHandler handler = handerMap.get(origin);
            if (handler != null) {
                return handler;
            }
            return handerMap.get("*");
        }
    Java
    - Registered: Mon May 06 08:04:11 GMT 2024
    - Last Modified: Thu Feb 22 01:37:57 GMT 2024
    - 1.4K bytes
    - Viewed (0)
  2. docs_src/handling_errors/tutorial004.py

    app = FastAPI()
    
    
    @app.exception_handler(StarletteHTTPException)
    async def http_exception_handler(request, exc):
        return PlainTextResponse(str(exc.detail), status_code=exc.status_code)
    
    
    @app.exception_handler(RequestValidationError)
    async def validation_exception_handler(request, exc):
        return PlainTextResponse(str(exc), status_code=400)
    
    
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Mar 26 19:09:53 GMT 2020
    - 762 bytes
    - Viewed (0)
  3. cmd/metrics-router.go

    		auth = NoAuthMiddleware
    	}
    	metricsRouter.Handle(prometheusMetricsPathLegacy, auth(metricsHandler()))
    	metricsRouter.Handle(prometheusMetricsV2ClusterPath, auth(metricsServerHandler()))
    	metricsRouter.Handle(prometheusMetricsV2BucketPath, auth(metricsBucketHandler()))
    	metricsRouter.Handle(prometheusMetricsV2NodePath, auth(metricsNodeHandler()))
    	metricsRouter.Handle(prometheusMetricsV2ResourcePath, auth(metricsResourceHandler()))
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun Mar 10 09:15:15 GMT 2024
    - 2.5K bytes
    - Viewed (0)
  4. internal/http/server_test.go

    	nonLoopBackIP := getNonLoopBackIP(t)
    	handler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
    		fmt.Fprintf(w, "Hello, world")
    	})
    
    	testCases := []struct {
    		addrs   []string
    		handler http.Handler
    		certFn  certs.GetCertificateFunc
    	}{
    		{[]string{"127.0.0.1:9000"}, handler, nil},
    		{[]string{nonLoopBackIP + ":9000"}, handler, nil},
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed Mar 27 15:10:40 GMT 2024
    - 2.7K bytes
    - Viewed (0)
  5. internal/grid/debug.go

    		addr := l.Addr()
    		hosts = append(hosts, "http://"+addr.String())
    		listeners = append(listeners, l)
    	}
    	return
    }
    
    func startHTTPServer(listener net.Listener, handler http.Handler) (server *httptest.Server) {
    	server = httptest.NewUnstartedServer(handler)
    	server.Config.Addr = listener.Addr().String()
    	server.Listener = listener
    	server.Start()
    	return server
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Feb 08 18:15:27 GMT 2024
    - 4.2K bytes
    - Viewed (0)
  6. okcurl/src/main/kotlin/okhttp3/curl/logging/LoggingUtil.kt

                activeLogger.level = Level.FINE
                handler.level = Level.FINE
                handler.formatter = MessageFormatter
                activeLogger.addHandler(handler)
              }
    
              if (sslDebug) {
                val activeLogger = getLogger("javax.net.ssl")
    
                activeLogger.level = Level.FINEST
                handler.level = Level.FINEST
                handler.formatter = MessageFormatter
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Fri Apr 05 03:30:42 GMT 2024
    - 2.7K bytes
    - Viewed (1)
  7. docs_src/custom_request_and_route/tutorial001.py

    
    class GzipRoute(APIRoute):
        def get_route_handler(self) -> Callable:
            original_route_handler = super().get_route_handler()
    
            async def custom_route_handler(request: Request) -> Response:
                request = GzipRequest(request.scope, request.receive)
                return await original_route_handler(request)
    
            return custom_route_handler
    
    
    app = FastAPI()
    app.router.route_class = GzipRoute
    
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri May 13 23:38:22 GMT 2022
    - 973 bytes
    - Viewed (0)
  8. internal/http/server.go

    			return
    		}
    
    		atomic.AddInt32(&srv.requestCount, 1)
    		defer atomic.AddInt32(&srv.requestCount, -1)
    
    		// Handle request using passed handler.
    		handler.ServeHTTP(w, r)
    	})
    
    	srv.listenerMutex.Lock()
    	srv.Handler = wrappedHandler
    	srv.listener = listener
    	srv.listenerMutex.Unlock()
    
    	var l net.Listener = listener
    	if tlsConfig != nil {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Feb 09 21:25:16 GMT 2024
    - 7.7K bytes
    - Viewed (0)
  9. maven-core/src/main/java/org/apache/maven/project/DefaultMavenProjectHelper.java

                MavenProject project, String artifactType, String artifactClassifier, File artifactFile) {
            ArtifactHandler handler = null;
    
            if (artifactType != null) {
                handler = artifactHandlerManager.getArtifactHandler(artifactType);
            }
    
            if (handler == null) {
                handler = artifactHandlerManager.getArtifactHandler("jar");
            }
    
    Java
    - Registered: Sun May 05 03:35:11 GMT 2024
    - Last Modified: Mon Dec 26 15:12:32 GMT 2022
    - 4.3K bytes
    - Viewed (0)
  10. docs_src/custom_request_and_route/tutorial002.py

    from fastapi.routing import APIRoute
    
    
    class ValidationErrorLoggingRoute(APIRoute):
        def get_route_handler(self) -> Callable:
            original_route_handler = super().get_route_handler()
    
            async def custom_route_handler(request: Request) -> Response:
                try:
                    return await original_route_handler(request)
                except RequestValidationError as exc:
                    body = await request.body()
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri May 13 23:38:22 GMT 2022
    - 932 bytes
    - Viewed (0)
Back to top