12-08-2024 11:02 PM
i am facing this error while i am trying to connect http web server to this python code where labview is server and python as client to receive message status as ok in python but i am just getting empty string {}
import requests
# URL of the LabVIEW Web Service
url = "http://127.0.0.1:80/WebService1/anupvi" # Update to match your web service URL
# Sending a GET request
response = requests.get(url)
# Print the response from LabVIEW
if response.status_code == 200:
print("Response from LabVIEW:", response.json())
else:
print("Failed to connect. Status code:", response.status_code)
12-09-2024 12:03 AM
here labview act as a server and python is acting as client. but im getting empty string in python output. can sameone help to resolve this error.
12-09-2024 03:01 AM
As far as I know, you can't use LabVIEW Web Service Request like you do here.
You need to create a WebService inside you project. Here is a tutorial : Tutorial: Creating and Publishing a LabVIEW Web Service to the NI Web Server (Windows) - NI