Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 363 for routes (0.2 sec)

  1. tests/test_extra_routes.py

    app = FastAPI()
    
    
    class Item(BaseModel):
        name: str
        price: Optional[float] = None
    
    
    @app.api_route("/items/{item_id}", methods=["GET"])
    def get_items(item_id: str):
        return {"item_id": item_id}
    
    
    def get_not_decorated(item_id: str):
        return {"item_id": item_id}
    
    
    app.add_api_route("/items-not-decorated/{item_id}", get_not_decorated)
    
    
    @app.delete("/items/{item_id}")
    Python
    - Registered: Sun Apr 14 07:19:09 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 13.7K bytes
    - Viewed (0)
  2. istioctl/pkg/writer/envoy/configdump/route.go

    			}
    			routes = append(routes, routeTyped)
    		}
    	}
    	if len(routes) == 0 {
    		return nil, fmt.Errorf("no routes found")
    	}
    	sort.Slice(routes, func(i, j int) bool {
    		iName, err := strconv.Atoi(routes[i].Name)
    		if err != nil {
    			return false
    		}
    		jName, err := strconv.Atoi(routes[j].Name)
    		if err != nil {
    			return false
    		}
    		return iName < jName
    	})
    	return routes, nil
    }
    
    Go
    - Registered: Wed Apr 10 22:53:08 GMT 2024
    - Last Modified: Thu May 11 05:38:17 GMT 2023
    - 7.2K bytes
    - Viewed (0)
  3. tests/test_custom_route_class.py

    
    @router_b.get("/")
    def get_b():
        return {"msg": "B"}
    
    
    @router_c.get("/")
    def get_c():
        return {"msg": "C"}
    
    
    router_b.include_router(router=router_c, prefix="/c")
    router_a.include_router(router=router_b, prefix="/b")
    app.include_router(router=router_a, prefix="/a")
    
    
    client = TestClient(app)
    
    
    @pytest.mark.parametrize(
        "path,expected_status,expected_response",
        [
    Python
    - Registered: Sun Apr 14 07:19:09 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 3.1K bytes
    - Viewed (0)
  4. istioctl/pkg/util/configdump/route.go

    		route := &route.RouteConfiguration{}
    		err = drc[i].RouteConfig.UnmarshalTo(route)
    		if err != nil {
    			return nil, err
    		}
    		sort.Slice(route.VirtualHosts, func(i, j int) bool {
    			return route.VirtualHosts[i].Name < route.VirtualHosts[j].Name
    		})
    		drc[i].RouteConfig = protoconv.MessageToAny(route)
    	}
    
    	if stripVersions {
    		for i := range drc {
    			drc[i].VersionInfo = ""
    			drc[i].LastUpdated = nil
    		}
    	}
    Go
    - Registered: Wed Apr 10 22:53:08 GMT 2024
    - Last Modified: Thu Nov 03 08:41:32 GMT 2022
    - 3.2K bytes
    - Viewed (0)
  5. okhttp/src/main/kotlin/okhttp3/internal/connection/RouteSelector.kt

            val route = Route(address, proxy, inetSocketAddress)
            if (routeDatabase.shouldPostpone(route)) {
              postponedRoutes += route
            } else {
              routes += route
            }
          }
    
          if (routes.isNotEmpty()) {
            break
          }
        }
    
        if (routes.isEmpty()) {
          // We've exhausted all Proxies so fallback to the postponed routes.
          routes += postponedRoutes
    Plain Text
    - Registered: Fri Apr 12 11:42:09 GMT 2024
    - Last Modified: Wed Mar 06 17:33:38 GMT 2024
    - 7.2K bytes
    - Viewed (0)
  6. fastapi/openapi/utils.py

                    responses_from_routes.append(route.response_field)
                if route.response_fields:
                    responses_from_routes.extend(route.response_fields.values())
                if route.callbacks:
                    callback_flat_models.extend(get_fields_from_routes(route.callbacks))
                params = get_flat_params(route.dependant)
                request_fields_from_routes.extend(params)
    
    Python
    - Registered: Sun Apr 14 07:19:09 GMT 2024
    - Last Modified: Sat Aug 26 18:03:13 GMT 2023
    - 21.8K bytes
    - Viewed (0)
  7. istioctl/pkg/writer/compare/route.go

    		if err != nil {
    			return err
    		}
    		istiodBytes.WriteString(istiod)
    	}
    	diff := difflib.UnifiedDiff{
    		FromFile: "Istiod Routes",
    		A:        difflib.SplitLines(istiodBytes.String()),
    		ToFile:   "Envoy Routes",
    		B:        difflib.SplitLines(envoyBytes.String()),
    		Context:  c.context,
    	}
    	text, err := difflib.GetUnifiedDiffString(diff)
    	if err != nil {
    		return err
    	}
    Go
    - Registered: Wed Apr 10 22:53:08 GMT 2024
    - Last Modified: Tue Mar 12 10:02:09 GMT 2024
    - 2.3K bytes
    - Viewed (0)
  8. okhttp/src/main/kotlin/okhttp3/internal/connection/RealRoutePlanner.kt

      /** Returns a plan for the first attempt at [route]. This throws if no plan is possible. */
      @Throws(IOException::class)
      internal fun planConnectToRoute(
        route: Route,
        routes: List<Route>? = null,
      ): ConnectPlan {
        if (route.address.sslSocketFactory == null) {
          if (ConnectionSpec.CLEARTEXT !in route.address.connectionSpecs) {
            throw UnknownServiceException("CLEARTEXT communication not enabled for client")
    Plain Text
    - Registered: Fri Apr 12 11:42:09 GMT 2024
    - Last Modified: Wed Apr 03 20:39:41 GMT 2024
    - 12K bytes
    - Viewed (0)
  9. cni/pkg/ambient/net_linux.go

    	}
    	// default route is not handled proper in netlink
    	// https://github.com/vishvananda/netlink/issues/670
    	// https://github.com/vishvananda/netlink/issues/611
    	for i, route := range routes {
    		if (route.Dst == nil || route.Dst.IP == nil) && route.Src == nil && route.Gw == nil && route.MPLSDst == nil {
    			_, defaultDst, _ := net.ParseCIDR("0.0.0.0/0")
    			routes[i].Dst = defaultDst
    		}
    	}
    	err = routesDelete(routes)
    Go
    - Registered: Wed Jan 24 22:53:09 GMT 2024
    - Last Modified: Mon Dec 04 17:04:00 GMT 2023
    - 46.4K bytes
    - Viewed (0)
  10. okhttp/src/test/java/okhttp3/internal/connection/RouteSelectorTest.kt

        val selection = routeSelector.next()
        dns.assertRequests(uriHost)
        val routes = selection.routes
        assertRoute(routes[0], address, Proxy.NO_PROXY, dns.lookup(uriHost, 0), uriPort)
        assertRoute(routes[1], address, Proxy.NO_PROXY, dns.lookup(uriHost, 1), uriPort)
        assertThat(selection.next()).isSameAs(routes[0])
        assertThat(selection.next()).isSameAs(routes[1])
        assertThat(selection.hasNext()).isFalse()
    Plain Text
    - Registered: Fri Apr 12 11:42:09 GMT 2024
    - Last Modified: Wed Mar 06 17:33:38 GMT 2024
    - 20.8K bytes
    - Viewed (0)
Back to top