- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 85 for accept (0.16 sec)
-
docs_src/app_testing/tutorial002.py
app = FastAPI() @app.get("/") async def read_main(): return {"msg": "Hello World"} @app.websocket("/ws") async def websocket(websocket: WebSocket): await websocket.accept() await websocket.send_json({"msg": "Hello WebSocket"}) await websocket.close() def test_read_main(): client = TestClient(app) response = client.get("/") assert response.status_code == 200
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Wed Feb 08 10:23:07 GMT 2023 - 757 bytes - Viewed (0) -
docs/ru/docs/tutorial/cors.md
* `allow_headers` - Список HTTP-заголовков, которые должны поддерживаться при кросс-доменных запросах. По умолчанию равно `[]`. Можно использовать `['*']`, чтобы разрешить все заголовки. Заголовки `Accept`, `Accept-Language`, `Content-Language` и `Content-Type` всегда разрешены для <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#simple_requests" class="external-link" rel="noopener" target="_blank">простых CORS-запросов</a>.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Jun 22 14:29:56 GMT 2023 - 8.3K bytes - Viewed (0) -
docs/de/docs/reference/websockets.md
- cookies - client - state - url_for - client_state - application_state - receive - send - accept - receive_text - receive_bytes - receive_json - iter_text - iter_bytes - iter_json - send_text - send_bytes
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Mar 30 18:16:27 GMT 2024 - 1.8K bytes - Viewed (0) -
docs_src/websockets/tutorial003_py39.py
</body> </html> """ class ConnectionManager: def __init__(self): self.active_connections: list[WebSocket] = [] async def connect(self, websocket: WebSocket): await websocket.accept() self.active_connections.append(websocket) def disconnect(self, websocket: WebSocket): self.active_connections.remove(websocket)
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 2.5K bytes - Viewed (0) -
docs/em/docs/tutorial/cors.md
* `allow_methods` - 📇 🇺🇸🔍 👩🔬 👈 🔜 ✔ ✖️-🇨🇳 📨. 🔢 `['GET']`. 👆 💪 ⚙️ `['*']` ✔ 🌐 🐩 👩🔬. * `allow_headers` - 📇 🇺🇸🔍 📨 🎚 👈 🔜 🐕🦺 ✖️-🇨🇳 📨. 🔢 `[]`. 👆 💪 ⚙️ `['*']` ✔ 🌐 🎚. `Accept`, `Accept-Language`, `Content-Language` & `Content-Type` 🎚 🕧 ✔ <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#simple_requests" class="external-link" rel="noopener" target="_blank">🙅 ⚜ 📨</a>.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat Apr 01 09:26:04 GMT 2023 - 4.1K bytes - Viewed (0) -
docs/en/docs/python-types.md
In Python 3.6 and above (including Python 3.10) you can use the `Union` type from `typing` and put inside the square brackets the possible types to accept. In Python 3.10 there's also a **new syntax** where you can put the possible types separated by a <abbr title='also called "bitwise or operator", but that meaning is not relevant here'>vertical bar (`|`)</abbr>.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 17K bytes - Viewed (0) -
docs/en/docs/tutorial/cors.md
* `allow_headers` - A list of HTTP request headers that should be supported for cross-origin requests. Defaults to `[]`. You can use `['*']` to allow all headers. The `Accept`, `Accept-Language`, `Content-Language` and `Content-Type` headers are always allowed for <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#simple_requests" class="external-link" rel="noopener" target="_blank">simple CORS requests</a>.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sun Nov 13 20:28:37 GMT 2022 - 5.1K bytes - Viewed (0) -
tests/test_http_connection_injection.py
return value @app.websocket("/ws") async def get_value_by_ws( websocket: WebSocket, value: int = Depends(extract_value_from_http_connection) ): await websocket.accept() await websocket.send_json(value) await websocket.close() client = TestClient(app) def test_value_extracting_by_http(): response = client.get("/http")
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sun Aug 09 13:56:41 GMT 2020 - 972 bytes - Viewed (0) -
docs/en/docs/js/custom.js
const div = document.querySelector('.github-topic-projects') async function getDataBatch(page) { const response = await fetch(`https://api.github.com/search/repositories?q=topic:fastapi&per_page=100&page=${page}`, { headers: { Accept: 'application/vnd.github.mercy-preview+json' } }) const data = await response.json() return data } async function getData() { let page = 1 let data = [] let dataBatch = await getDataBatch(page)
JavaScript - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat May 08 17:50:56 GMT 2021 - 6.6K bytes - Viewed (0) -
docs_src/websockets/tutorial001.py
</body> </html> """ @app.get("/") async def get(): return HTMLResponse(html) @app.websocket("/ws") async def websocket_endpoint(websocket: WebSocket): await websocket.accept() while True: data = await websocket.receive_text()
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Mar 26 19:09:53 GMT 2020 - 1.4K bytes - Viewed (0)