Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 153 for send (0.18 sec)

  1. tests/test_ws_router.py

            @functools.wraps(app)
            async def wrapped_app(scope, receive, send):
                if scope["type"] != "websocket":
                    return await app(scope, receive, send)  # pragma: no cover
    
                async def call_next():
                    return await app(scope, receive, send)
    
                websocket = WebSocket(scope, receive=receive, send=send)
                return await middleware_func(websocket, call_next)
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sun Jun 11 19:08:14 GMT 2023
    - 7.5K bytes
    - Viewed (0)
  2. docs_src/openapi_callbacks/tutorial001.py

        And this path operation will:
    
        * Send the invoice to the client.
        * Collect the money from the client.
        * Send a notification back to the API user (the external developer), as a callback.
            * At this point is that the API will somehow send a POST request to the
                external API with the notification of the invoice event
                (e.g. "payment successful").
        """
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat May 14 11:59:59 GMT 2022
    - 1.3K bytes
    - Viewed (0)
  3. docs/en/docs/reference/websockets.md

                - application_state
                - receive
                - send
                - accept
                - receive_text
                - receive_bytes
                - receive_json
                - iter_text
                - iter_bytes
                - iter_json
                - send_text
                - send_bytes
                - send_json
                - close
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 1.6K bytes
    - Viewed (0)
  4. tests/test_tutorial/test_websockets/test_tutorial002_an_py39.py

                message = "Message one"
                websocket.send_text(message)
                data = websocket.receive_text()
                assert data == "Session cookie or query token value is: fakesession"
                data = websocket.receive_text()
                assert data == f"Message text was: {message}, for item ID: foo"
                message = "Message two"
                websocket.send_text(message)
                data = websocket.receive_text()
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 3.9K bytes
    - Viewed (0)
  5. tests/test_tutorial/test_websockets/test_tutorial001.py

            with client.websocket_connect("/ws") as websocket:
                message = "Message one"
                websocket.send_text(message)
                data = websocket.receive_text()
                assert data == f"Message text was: {message}"
                message = "Message two"
                websocket.send_text(message)
                data = websocket.receive_text()
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 10 09:08:19 GMT 2020
    - 822 bytes
    - Viewed (0)
  6. tests/test_tutorial/test_websockets/test_tutorial002_an.py

                message = "Message one"
                websocket.send_text(message)
                data = websocket.receive_text()
                assert data == "Session cookie or query token value is: fakesession"
                data = websocket.receive_text()
                assert data == f"Message text was: {message}, for item ID: foo"
                message = "Message two"
                websocket.send_text(message)
                data = websocket.receive_text()
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 3.6K bytes
    - Viewed (0)
  7. docs_src/websockets/tutorial002_py310.py

    ):
        await websocket.accept()
        while True:
            data = await websocket.receive_text()
            await websocket.send_text(
                f"Session cookie or query token value is: {cookie_or_token}"
            )
            if q is not None:
                await websocket.send_text(f"Query parameter q is: {q}")
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 2.7K bytes
    - Viewed (0)
  8. docs_src/background_tasks/tutorial002_py310.py

            background_tasks.add_task(write_log, message)
        return q
    
    
    @app.post("/send-notification/{email}")
    async def send_notification(
        email: str, background_tasks: BackgroundTasks, q: str = Depends(get_query)
    ):
        message = f"message to {email}\n"
        background_tasks.add_task(write_log, message)
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jan 07 14:11:31 GMT 2022
    - 643 bytes
    - Viewed (0)
  9. fastapi/security/api_key.py

        with the API key and integrates that into the OpenAPI documentation. It extracts
        the key value sent in the query parameter automatically and provides it as the
        dependency result. But it doesn't define how to send that API key to the client.
    
        ## Usage
    
        Create an instance object and use that object as the dependency in `Depends()`.
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Apr 23 22:29:18 GMT 2024
    - 9.1K bytes
    - Viewed (0)
  10. tests/test_tutorial/test_background_tasks/test_tutorial002.py

    
    def test():
        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:
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Jul 09 18:06:12 GMT 2020
    - 568 bytes
    - Viewed (0)
Back to top