- Sort Score
- Result 10 results
- Languages All
Results 901 - 910 of 1,560 for respond (0.19 sec)
-
docs_src/response_model/tutorial003_04.py
from typing import Union from fastapi import FastAPI, Response from fastapi.responses import RedirectResponse app = FastAPI() @app.get("/portal") async def get_portal(teleport: bool = False) -> Union[Response, dict]: if teleport: return RedirectResponse(url="https://www.youtube.com/watch?v=dQw4w9WgXcQ")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Jan 10 16:22:47 UTC 2023 - 384 bytes - Viewed (0) -
okhttp-sse/src/main/kotlin/okhttp3/sse/EventSourceListener.kt
* limitations under the License. */ package okhttp3.sse import okhttp3.Response abstract class EventSourceListener { /** * Invoked when an event source has been accepted by the remote peer and may begin transmitting * events. */ open fun onOpen( eventSource: EventSource, response: Response, ) { } /** * TODO description. */ open fun onEvent(
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1.5K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/NativeImageTestsAccessors.kt
* See the License for the specific language governing permissions and * limitations under the License. */ package okhttp3.internal import okhttp3.Cache import okhttp3.Dispatcher import okhttp3.Response import okhttp3.internal.connection.Exchange import okhttp3.internal.connection.RealCall import okhttp3.internal.connection.RealConnection import okio.FileSystem import okio.Path internal fun buildCache(
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Wed Apr 10 19:46:48 UTC 2024 - 1.3K bytes - Viewed (0) -
docs_src/custom_response/tutorial009c.py
from typing import Any import orjson from fastapi import FastAPI, Response app = FastAPI() class CustomORJSONResponse(Response): media_type = "application/json" def render(self, content: Any) -> bytes: assert orjson is not None, "orjson must be installed" return orjson.dumps(content, option=orjson.OPT_INDENT_2) @app.get("/", response_class=CustomORJSONResponse) async def main():
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Sep 01 09:32:30 UTC 2022 - 451 bytes - Viewed (0) -
tests/test_tutorial/test_custom_response/test_tutorial009b.py
file_path: Path = tmp_path / "large-video-file.mp4" tutorial009b.some_file_path = str(file_path) test_content = b"Fake video bytes" file_path.write_bytes(test_content) response = client.get("/")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sat Jul 03 19:51:28 UTC 2021 - 490 bytes - Viewed (0) -
tests/test_tutorial/test_background_tasks/test_tutorial002_py310.py
client = TestClient(app) log = Path("log.txt") if log.is_file(): os.remove(log) # pragma: no cover response = client.post("/send-notification/******@****.***?q=some-query") assert response.status_code == 200, response.text assert response.json() == {"message": "Message sent"} with open("./log.txt") as f:
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jan 07 14:11:31 UTC 2022 - 628 bytes - Viewed (0) -
docs/zh/docs/advanced/additional-responses.md
"404": { "description": "Additional Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Message" } } } }, "200": { "description": "Successful Response", "content": { "application/json": {
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 8.2K bytes - Viewed (0) -
docs/en/docs/tutorial/handling-errors.md
```Python hl_lines="11" {!../../docs_src/handling_errors/tutorial001.py!} ``` ### The resulting response If the client requests `http://example.com/items/foo` (an `item_id` `"foo"`), that client will receive an HTTP status code of 200, and a JSON response of: ```JSON { "item": "The Foo Wrestlers" } ```
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 9.1K bytes - Viewed (0) -
src/main/java/org/codelibs/fess/suggest/Suggester.java
final GetIndexResponse response = client.admin().indices().prepareGetIndex().addIndices("*").execute().actionGet(suggestSettings.getIndicesTimeout()); Stream.of(response.getIndices()).filter(s -> { if (!isSuggestIndex(s)) { return false; } final List<AliasMetadata> list = response.getAliases().get(s); if (list == null) {
Registered: Fri Nov 08 09:08:12 UTC 2024 - Last Modified: Sat Oct 12 00:10:39 UTC 2024 - 14.6K bytes - Viewed (0) -
okcurl/src/main/kotlin/okhttp3/curl/internal/-MainCommon.kt
client = createClient() val request = createRequest() try { val response = client!!.newCall(request).execute() if (showHeaders) { println(StatusLine.get(response)) val headers = response.headers for ((name, value) in headers) { println("$name: $value") } println() } // Stream the response to the System.out as it is returned from the server. val out = System.out.sink()
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 2.7K bytes - Viewed (0)