Search Options

Results per page
Sort
Preferred Languages
Advance

Results 4961 - 4970 of 6,918 for RETURN (0.06 sec)

  1. tests/test_additional_response_extra.py

    from fastapi import APIRouter, FastAPI
    from fastapi.testclient import TestClient
    
    router = APIRouter()
    
    sub_router = APIRouter()
    
    app = FastAPI()
    
    
    @sub_router.get("/")
    def read_item():
        return {"id": "foo"}
    
    
    router.include_router(sub_router, prefix="/items")
    
    app.include_router(router)
    
    client = TestClient(app)
    
    
    def test_path_operation():
        response = client.get("/items/")
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 1.2K bytes
    - Viewed (0)
  2. tests/test_deprecated_openapi_prefix.py

    from fastapi import FastAPI, Request
    from fastapi.testclient import TestClient
    
    app = FastAPI(openapi_prefix="/api/v1")
    
    
    @app.get("/app")
    def read_main(request: Request):
        return {"message": "Hello World", "root_path": request.scope.get("root_path")}
    
    
    client = TestClient(app)
    
    
    def test_main():
        response = client.get("/app")
        assert response.status_code == 200
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 1.2K bytes
    - Viewed (0)
  3. docs_src/dependencies/tutorial008b_an.py

        if item_id not in data:
            raise HTTPException(status_code=404, detail="Item not found")
        item = data[item_id]
        if item["owner"] != username:
            raise OwnerError(username)
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Dec 26 20:37:34 UTC 2023
    - 785 bytes
    - Viewed (0)
  4. okhttp-hpacktests/src/test/java/okhttp3/internal/http2/HpackDecodeTestBase.kt

        protected fun createStories(interopTests: Array<String>): List<Any> {
          if (interopTests.isEmpty()) return listOf<Any>(Story.MISSING)
    
          val result = mutableListOf<Any>()
          for (interopTestName in interopTests) {
            val stories = HpackJsonUtil.readStories(interopTestName)
            result.addAll(stories)
          }
          return result
        }
    
        /**
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 2.2K bytes
    - Viewed (0)
  5. android/guava-testlib/src/com/google/common/collect/testing/ConcurrentMapTestSuiteBuilder.java

      public static <K, V> ConcurrentMapTestSuiteBuilder<K, V> using(TestMapGenerator<K, V> generator) {
        ConcurrentMapTestSuiteBuilder<K, V> result = new ConcurrentMapTestSuiteBuilder<>();
        result.usingGenerator(generator);
        return result;
      }
    
      @SuppressWarnings("rawtypes") // class literals
      static final List<? extends Class<? extends AbstractTester>> TESTERS =
          asList(
              ConcurrentMapPutIfAbsentTester.class,
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 2.2K bytes
    - Viewed (0)
  6. okhttp/src/main/kotlin/okhttp3/internal/http/RequestLine.kt

        proxyType: Proxy.Type,
      ): Boolean {
        return !request.isHttps && proxyType == Proxy.Type.HTTP
      }
    
      /**
       * Returns the path to request, like the '/' in 'GET / HTTP/1.1'. Never empty, even if the request
       * URL is. Includes the query component if it exists.
       */
      fun requestPath(url: HttpUrl): String {
        val path = url.encodedPath
        val query = url.encodedQuery
        return if (query != null) "$path?$query" else path
      }
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 2K bytes
    - Viewed (0)
  7. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/InsecureAndroidTrustManager.kt

        chain: Array<out X509Certificate>,
        authType: String,
        host: String,
      ): List<Certificate> {
        if (host in insecureHosts) return listOf()
        try {
          val method =
            checkServerTrustedMethod
              ?: throw CertificateException("Failed to call checkServerTrusted")
          return method.invoke(delegate, chain, authType, host) as List<Certificate>
        } catch (e: InvocationTargetException) {
          throw e.targetException
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 2.4K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/base/Internal.java

        // Using a try/catch seems lazy, but the catch block will rarely get invoked (except for
        // durations longer than approximately +/- 292 years).
        try {
          return duration.toNanos();
        } catch (ArithmeticException tooBig) {
          return duration.isNegative() ? Long.MIN_VALUE : Long.MAX_VALUE;
        }
      }
    
      private Internal() {}
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Jan 11 14:30:06 UTC 2024
    - 2K bytes
    - Viewed (0)
  9. guava-testlib/src/com/google/common/collect/testing/ConcurrentMapTestSuiteBuilder.java

      public static <K, V> ConcurrentMapTestSuiteBuilder<K, V> using(TestMapGenerator<K, V> generator) {
        ConcurrentMapTestSuiteBuilder<K, V> result = new ConcurrentMapTestSuiteBuilder<>();
        result.usingGenerator(generator);
        return result;
      }
    
      @SuppressWarnings("rawtypes") // class literals
      static final List<? extends Class<? extends AbstractTester>> TESTERS =
          asList(
              ConcurrentMapPutIfAbsentTester.class,
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 2.2K bytes
    - Viewed (0)
  10. guava-gwt/src-super/com/google/common/util/concurrent/super/com/google/common/util/concurrent/GwtFuturesCatchingSpecialization.java

          Executor executor) {
        return AbstractCatchingFuture.create(input, exceptionType, fallback, executor);
      }
    
      public static <V extends @Nullable Object> ListenableFuture<V> catchingAsync(
          ListenableFuture<? extends V> input,
          Class<Throwable> exceptionType,
          AsyncFunction<? super Throwable, ? extends V> fallback,
          Executor executor) {
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Jun 24 17:45:05 UTC 2024
    - 2K bytes
    - Viewed (0)
Back to top