- Sort Score
- Result 10 results
- Languages All
Results 101 - 110 of 609 for await (0.02 sec)
-
docs_src/path_operation_advanced_configuration/tutorial007.py
"requestBody": { "content": {"application/x-yaml": {"schema": Item.model_json_schema()}}, "required": True, }, }, ) async def create_item(request: Request): raw_body = await request.body() try: data = yaml.safe_load(raw_body) except yaml.YAMLError: raise HTTPException(status_code=422, detail="Invalid YAML") try: item = Item.model_validate(data)
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 822 bytes - Viewed (0) -
android/guava-testlib/test/com/google/common/testing/FakeTickerTest.java
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Oct 22 13:49:09 UTC 2024 - 6.5K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/SequentialExecutorTest.java
// SequentialExecutor by the time the barrier is satisfied barrier.await(1, SECONDS); executor.execute(barrierTask); // timeout means the second task wasn't even tried barrier.await(1, SECONDS); } finally { service.shutdown(); } } public void testRejectedExecutionThrownWithMultipleCalls() throws Exception {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 22:10:29 UTC 2024 - 11.4K bytes - Viewed (0) -
docs/em/docs/advanced/events.md
```Python with open("file.txt") as file: file.read() ``` ⏮️ ⏬ 🐍, 📤 **🔁 🔑 👨💼**. 👆 🔜 ⚙️ ⚫️ ⏮️ `async with`: ```Python async with lifespan(app): await do_stuff() ``` 🕐❔ 👆 ✍ 🔑 👨💼 ⚖️ 🔁 🔑 👨💼 💖 🔛, ⚫️❔ ⚫️ 🔨 👈, ⏭ 🛬 `with` 🍫, ⚫️ 🔜 🛠️ 📟 ⏭ `yield`, & ⏮️ ❎ `with` 🍫, ⚫️ 🔜 🛠️ 📟 ⏮️ `yield`. 👆 📟 🖼 🔛, 👥 🚫 ⚙️ ⚫️ 🔗, ✋️ 👥 🚶♀️ ⚫️ FastAPI ⚫️ ⚙️ ⚫️.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 6.1K bytes - Viewed (0) -
tests/test_dependency_contextvars.py
legacy_request_state_context_var.reset(contextvar_token) @app.middleware("http") async def custom_middleware( request: Request, call_next: Callable[[Request], Awaitable[Response]] ): response = await call_next(request) response.headers["custom"] = "foo" return response @app.get("/user", dependencies=[Depends(set_up_request_state_dependency)]) def get_user():
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Feb 17 12:40:12 UTC 2022 - 1.5K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/InterceptorTest.kt
.build() } val request = Request.Builder() .url(server.url("/")) .build() client.newCall(request).enqueue(callback) callback.await(request.url) .assertCode(200) .assertHeader("OkHttp-Intercepted", "yep") } @Test fun applicationInterceptorsCanMakeMultipleRequestsToServer() {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sun Jan 14 10:20:09 UTC 2024 - 27.8K bytes - Viewed (0) -
docs/en/docs/advanced/events.md
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Mon Oct 28 10:36:22 UTC 2024 - 7.6K bytes - Viewed (0) -
docs/zh/docs/advanced/websockets.md
``` /// note | "技术细节" 您也可以使用 `from starlette.websockets import WebSocket`。 **FastAPI** 直接提供了相同的 `WebSocket`,只是为了方便开发人员。但它直接来自 Starlette。 /// ## 等待消息并发送消息 在您的 WebSocket 路由中,您可以使用 `await` 等待消息并发送消息。 ```Python hl_lines="48-52" {!../../docs_src/websockets/tutorial001.py!} ``` 您可以接收和发送二进制、文本和 JSON 数据。 ## 尝试一下 如果您的文件名为 `main.py`,请使用以下命令运行应用程序: ```console
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 5.9K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/ExecutionSequencerTest.java
public @Nullable Void call() throws InterruptedException { running = true; startLatch.countDown(); stopLatch.await(); running = false; return null; } public void waitForStart() throws InterruptedException { startLatch.await(); } public void stop() { stopLatch.countDown(); } public boolean isRunning() {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 22:10:29 UTC 2024 - 16.7K bytes - Viewed (0) -
guava-tests/test/com/google/common/collect/QueuesTest.java
private void assertInterruptibleDrained(BlockingQueue<Object> q) { // nothing to drain, thus this should wait doing nothing try { assertEquals(0, Queues.drain(q, ImmutableList.of(), 0, 10, MILLISECONDS)); } catch (InterruptedException e) { throw new AssertionError(); } // but does the wait actually occurs? @SuppressWarnings("unused") // https://errorprone.info/bugpattern/FutureReturnValueIgnored
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Thu Oct 17 02:42:09 UTC 2024 - 12.1K bytes - Viewed (0)