G Web Development Software

取消
显示结果 
搜索替代 
您的意思是: 

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 项奖励
1 条消息(共 4 条)
1,250 次查看

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

~ Helping pave the path to long-term living and thriving in space. ~
0 项奖励
2 条消息(共 4 条)
1,238 次查看

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 项奖励
3 条消息(共 4 条)
1,203 次查看

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.

~ Helping pave the path to long-term living and thriving in space. ~
0 项奖励
4 条消息(共 4 条)
1,189 次查看