PySide6.QtHttpServer.QHttpServerWebSocketUpgradeResponse¶
- class QHttpServerWebSocketUpgradeResponse¶
- Response to return when verifying WebSocket upgrades on HTTP server. More… - Added in version 6.8. - Synopsis¶- Methods¶- def - __init__()
- def - denyMessage()
- def - denyStatus()
- def - swap()
- def - type()
 - Static functions¶- def - accept()
- def - deny()
- def - passToNext()
 - Note - This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE - Detailed Description¶- Use this class to return when determining whether a socket upgrade should succeed. If - type()is- Acceptupgrade the socket, if- type()is- Denysend an error with the given- denyStatus()and- denyMessage(), and if- type()is- PassToNextproceed to the next registered handler. If all handlers return- PassToNextor none exist,- missingHandler()is executed.- See also - addWebSocketUpgradeVerifier()- missingHandler()- class ResponseType¶
- Response types - Constant - Description - QHttpServerWebSocketUpgradeResponse.ResponseType.Accept - Accept the WebSocket upgrade request. - QHttpServerWebSocketUpgradeResponse.ResponseType.Deny - Deny the WebSocket upgrade request. - QHttpServerWebSocketUpgradeResponse.ResponseType.PassToNext - Pass the Websocket upgrade decision to the next verifier if any. - See also - addWebSocketUpgradeVerifier()- type()
 - __init__(other)¶
- Parameters:
 
 - Copy-constructs an instance of a - QHttpServerWebSocketUpgradeResponseobject from- other.- static accept()¶
- Return type:
 
 - Creates an instance of - QHttpServerWebSocketUpgradeResponsewith- type()- Accept.- See also - static deny()¶
- Return type:
 
 - Creates an instance of - QHttpServerWebSocketUpgradeResponsewith- type()- Deny,- denyStatus()403 and the- denyMessage()“Forbidden”.- See also - static deny(status, message)
- Parameters:
- status – int 
- message – - QByteArray
 
- Return type:
 
 - Creates an instance of - QHttpServerWebSocketUpgradeResponsewith- type()- Deny,- denyStatus()- statusand- denyMessage()- message.- See also - denyMessage()¶
- Return type:
 
 - Returns the error message to return if - type()is- Deny.- denyStatus()¶
- Return type:
- int 
 
 - Returns the HTTP status code to return if - type()is- Deny.- static passToNext()¶
- Return type:
 
 - Creates an instance of - QHttpServerWebSocketUpgradeResponsewith- type()- PassToNext.- See also - swap(other)¶
- Parameters:
 
 - Swaps the contents of this with - other- type()¶
- Return type:
 
 - Returns the type of response. - See also