Adding copilot IVA requests to posting

This commit is contained in:
2025-08-29 12:21:03 -05:00
parent 0bc527e78c
commit c6bb4719f7
8 changed files with 178 additions and 47 deletions

View File

@@ -0,0 +1,15 @@
from posting import Posting
import httpx
def on_response(response: httpx.Response, posting: Posting) -> None:
# Raise an exception if the request failed
response.raise_for_status()
# Set a variable to be used in later requests.
# You can write '$auth_token' in the UI and it will be substituted with
# the value of the $auth_token variable.
access_token = response.json().get("access_token")
print ("Successfully obtained access_token")
posting.set_variable("access_token", access_token)