def call_logic_app()

in backend-printing/helper/universal_print_client.py [0:0]


    def call_logic_app(self, print_items) -> requests.Response:
        """Call the logic app to print the items.
        Args:
            print_item: print item json message

        Returns:
            dict: response
        """
        try:
            headers = {"Content-Type": "application/json"}
            response = requests.post(
                url=os.environ["LOGIC_APP_URL"],
                headers=headers,
                json=print_items,
            )
            return response
        except Exception as e:
            raise Exception(f"Error occurred while calling logic app: {e}")