G Web Development Software

cancel
Showing results for 
Search instead for 
Did you mean: 

PUT/ GET METHOD

Hi,

 

I trie to develop a webserver to visualize and send command at a raspberry pi4.

 

My VI run on the raspberry, and with the Webservice and G-Web, I can display on a web site many values.

 

But when I want to send a new value with the web site to the raspberry, with the PUT method:

 

- with the command in a web browser "http://192.168.1.168:8001/WebService1/PUT_VALUE?GUIValue=10"
I have the error "Access Error: 404 -- Not Found"

 

- with G-Web Developpment software, with "PUT buffer.vi" in a diagram, I have the error below
"Javascript message: Failed to load http://192.168.1.168:8001/WebService/PUT_VALUE: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' Header is present on the request ressource.
Origin 'http://hpi7-ob:8001' is therefore not allowed access. The response had HTTP Status code 404."

 

Any idea about my error? How pass the"access control check"?


I tried different setup of CORS, but still stuck.

Thanks,

0 Kudos
Message 1 of 4
(256 Views)

You haven't said what actual CORS handling you've tried so we won't know what's different/wrong to try something else.

~ Self-professed LabVIEW wizard ~
Helping pave the path to long-term living and thriving in space.
0 Kudos
Message 2 of 4
(244 Views)

Thanks to have take time to answer.

 

In Gweb I allow remote connections from any client, and I have enabled CORS for all origins, like screen capture below.

 

For information, I use apache2 web serveur on raspberry.

0 Kudos
Message 3 of 4
(209 Views)

That's for the g web app, how are you deploying the web service? Likely need to set the cors headers on the requests being handled by the LabVIEW web service.

~ Self-professed LabVIEW wizard ~
Helping pave the path to long-term living and thriving in space.
0 Kudos
Message 4 of 4
(195 Views)