on_request_complete Event

Fired after an asynchronous request completes.

Syntax

class IPInfoRequestCompleteEventParams(object):
  @property
  def request_id() -> int: ...
  @property
  def status_code() -> int: ...
  @property
  def description() -> str: ...

# In class IPInfo:
@property
def on_request_complete() -> Callable[[IPInfoRequestCompleteEventParams], None]: ...
@on_request_complete.setter
def on_request_complete(event_hook: Callable[[IPInfoRequestCompleteEventParams], None]) -> None: ...

Remarks

The RequestId parameter specifies the request that just completed. The class properties that relate to this request are completed with the returned values. (For example, in the case of domain name resolution, host_name, host_address, host_aliases, and other_addresses are set to the resolved values.)

If the request completed normally, StatusCode is 0, and Description is "OK". If not, StatusCode has the error code returned by the system. Description contains a description of this code.

Please refer to the Error Codes section for more information.

NOTE: This functionality is only available in Windows.

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks 2020 Python Edition - Version 20.0 [Build 8307]