08-20-2022 07:24 PM
Hello!
I'm trying to do an HTTP POST request with LabVIEW NXG 5.1.0
If I run the code from a .gvi code works ok.
but when I run it from a .gviweb code, it returns the following response:
"JavaScript message: Failed to load https://console-vip.helium.com/api/v1/down/...: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost' is therefore not allowed access. The response had HTTP status code 404. in main.html at line 0"
When I remove the HTTP Handler and the ADD header nodes, I got a successful 200 code from the HTTP POST request, but the server API drop the request with the following message:
"description": "Failed to queue downlink (downlink_decode failed): payload_raw_not_found",
I will appreciate suggestions!
Best regards.
08-25-2022 05:19 AM
Hey!
I had a similar issue lately but with G Web so I'm not sure if this will work with NXG and the Web Module (even though G Web is the web module based on NXG).
In G Web there is an extra VI to configure CORS and to include credentials with a request if needed maybe this might help.