Share

HttpRequest.completed Event

Parent Object: HttpRequest
Defined in namespace "adsk::core" and the header file is <Core/Application/HttpRequest.h>

Description

The completed event fires when the request has completed. This event will fire on successful or failure.

Syntax

-------- Import ---------
# Import fusion360utils folder, which includes event_utils.py.
from ...lib import fusion360utils as futil

-------- Global variables ---------
# Global variable used to maintain a reference to all event handlers.
local_handlers = []

-------- Connect the handler to the event. ---------
# "httpRequest_var" is a variable referencing a HttpRequest object.
# "httpRequest_completed" is the event handler function.
futil.add_handler(httpRequest_var.completed, httpRequest_completed, local_handlers=local_handlers)

-------- Event handler function definition ---------
# Event handler for the completed event.
def httpRequest_completed(args: adsk.core.HttpEventArgs):
# Code to react to the event.
app.log('In httpRequest_completed event handler.')

Property Value

This is an event property that returns a HttpEvent.

Version

Introduced in version January 2024

Was this information helpful?