- Sort Score
- Result 10 results
- Languages All
Results 191 - 200 of 3,796 for get (0.03 sec)
-
tests/test_security_oauth2_authorization_code_bearer.py
oauth2_scheme = OAuth2AuthorizationCodeBearer( authorizationUrl="authorize", tokenUrl="token", auto_error=True ) @app.get("/items/") async def read_items(token: Optional[str] = Security(oauth2_scheme)): return {"token": token} client = TestClient(app) def test_no_token(): response = client.get("/items") assert response.status_code == 401, response.text assert response.json() == {"detail": "Not authenticated"}
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 2.3K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/CookiesTest.kt
client = client.newBuilder() .cookieJar(JavaNetCookieJar(cookieManager)) .build() get(urlWithIpAddress(server, "/")) val request1 = server.takeRequest() assertThat(request1.headers["Cookie"]).isNull() get(urlWithIpAddress(server, "/")) val request2 = server.takeRequest() assertThat(request2.headers["Cookie"]).isEqualTo("a=android; b=banana") }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 13K bytes - Viewed (0) -
internal/config/lambda/parse.go
} webhookArgs := target.WebhookArgs{ Enable: enabled, Endpoint: *url, Transport: transport, AuthToken: env.Get(authEnv, kv.Get(target.WebhookAuthToken)), ClientCert: env.Get(clientCertEnv, kv.Get(target.WebhookClientCert)), ClientKey: env.Get(clientKeyEnv, kv.Get(target.WebhookClientKey)), } if err = webhookArgs.Validate(); err != nil { return nil, err } webhookTargets[k] = webhookArgs
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri May 24 23:05:23 UTC 2024 - 6K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/SettableFutureTest.java
assertFalse(future.isDone()); assertFalse(future.isCancelled()); assertThrows(TimeoutException.class, () -> future.get(0, MILLISECONDS)); nested.set("foo"); assertTrue(future.isDone()); assertFalse(future.isCancelled()); assertEquals("foo", future.get()); } private static class Foo {} private static class FooChild extends Foo {}
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 22:10:29 UTC 2024 - 7.3K bytes - Viewed (0) -
tests/test_tutorial/test_dependencies/test_tutorial006.py
] } ) def test_get_invalid_one_header(): response = client.get("/items/", headers={"X-Token": "invalid"}) assert response.status_code == 400, response.text assert response.json() == {"detail": "X-Token header invalid"} def test_get_invalid_second_header(): response = client.get( "/items/", headers={"X-Token": "fake-super-secret-token", "X-Key": "invalid"} )
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 5K bytes - Viewed (0) -
tests/test_security_api_key_header_optional.py
user = User(username=oauth_header) return user @app.get("/users/me") def read_current_user(current_user: Optional[User] = Depends(get_current_user)): if current_user is None: return {"msg": "Create an account first"} return current_user client = TestClient(app) def test_security_api_key(): response = client.get("/users/me", headers={"key": "secret"})
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 2K bytes - Viewed (0) -
docs_src/dependency_testing/tutorial001_an.py
q: Union[str, None] = None, skip: int = 0, limit: int = 100 ): return {"q": q, "skip": skip, "limit": limit} @app.get("/items/") async def read_items(commons: Annotated[dict, Depends(common_parameters)]): return {"message": "Hello Items!", "params": commons} @app.get("/users/") async def read_users(commons: Annotated[dict, Depends(common_parameters)]): return {"message": "Hello Users!", "params": commons}
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 1.5K bytes - Viewed (0) -
build-logic/binary-compatibility/src/main/kotlin/gradlebuild/binarycompatibility/JApiCmpExtensions.kt
get() = fullyQualifiedName.substringAfterLast(".") internal val JApiClass.packagePath: String get() = packageName.replace(".", "/") internal val JApiClass.packageName: String
Registered: Wed Nov 06 11:36:14 UTC 2024 - Last Modified: Fri Jun 28 08:29:24 UTC 2024 - 1.5K bytes - Viewed (0) -
build-logic-commons/publishing/src/main/kotlin/gradlebuild.publish-public-libraries.gradle.kts
doFirst { val moduleBaseDir = localRepository.get().dir("org/gradle/${baseName.get()}").asFile if (moduleBaseDir.exists()) { // Make sure artifacts do not pile up locally moduleBaseDir.deleteRecursively() } } doLast { localRepository.get().file("org/gradle/${baseName.get()}/maven-metadata.xml").asFile.apply {
Registered: Wed Nov 06 11:36:14 UTC 2024 - Last Modified: Thu Sep 19 13:21:47 UTC 2024 - 5.9K bytes - Viewed (0) -
compat/maven-artifact/src/test/java/org/apache/maven/artifact/versioning/VersionRangeTest.java
restriction = restrictions.get(0); assertNull(restriction.getLowerBound(), CHECK_LOWER_BOUND); assertFalse(restriction.isLowerBoundInclusive(), CHECK_LOWER_BOUND_INCLUSIVE); assertEquals("1.0", restriction.getUpperBound().toString(), CHECK_UPPER_BOUND); assertTrue(restriction.isUpperBoundInclusive(), CHECK_UPPER_BOUND_INCLUSIVE); restriction = restrictions.get(1);
Registered: Sun Nov 03 03:35:11 UTC 2024 - Last Modified: Fri Oct 25 12:31:46 UTC 2024 - 44.3K bytes - Viewed (0)