mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-09 23:05:01 -06:00
Add default 'None' for onFinished
I don't always need to know whether it was successful. Contributes to issue CURA-5034.
This commit is contained in:
parent
82a34b49eb
commit
3b510af8f5
1 changed files with 8 additions and 1 deletions
|
@ -213,7 +213,14 @@ class NetworkedPrinterOutputDevice(PrinterOutputDevice):
|
|||
reply.uploadProgress.connect(onProgress)
|
||||
self._registerOnFinishedCallback(reply, onFinished)
|
||||
|
||||
def postFormWithParts(self, target:str, parts: List[QHttpPart], onFinished: Optional[Callable[[Any, QNetworkReply], None]], onProgress: Callable = None) -> None:
|
||||
## Send an API call to the printer via HTTP POST.
|
||||
# \param target The target URL on the printer.
|
||||
# \param parts The parts of a form. One must be provided for each form
|
||||
# element in the POST call. Create form parts using _createFormPart.
|
||||
# \param onFinished A function to call when the call has been completed.
|
||||
# \param onProgress A function to call when progress has been made. Use
|
||||
# this to update a progress bar.
|
||||
def postFormWithParts(self, target: str, parts: List[QHttpPart], onFinished: Optional[Callable[[Any, QNetworkReply], None]] = None, onProgress: Callable = None) -> None:
|
||||
if self._manager is None:
|
||||
self._createNetworkManager()
|
||||
request = self._createEmptyRequest(target, content_type=None)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue