This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

sending data to a web server
#2
No, there is no better solution at the moment. I would suggest to use the analysis blocks to add metadata to your data submission so you can easily recognize the submission that should be discarded (you could for example submit the result from the timer-block).

The could not parse JSON probably occurs because phyphox tries to parse the result to be written back to the buffers. You can either set the conversion attribute to conversion="none" to discard any response or let your server give a meaningful response that you can show to the user. For example you can respond with {"result": 1}, write it to a phyphox buffer and map different codes to different messages like "submission received" in a view element using its "map" node.
Reply


Messages In This Thread
sending data to a web server - by fbouquet - 10-31-2022, 05:03 PM
RE: sending data to a web server - by Sebastian Staacks - 10-31-2022, 05:45 PM
RE: sending data to a web server - by fbouquet - 11-03-2022, 04:05 PM
RE: sending data to a web server - by fbouquet - 02-06-2023, 04:51 PM
RE: sending data to a web server - by fbouquet - 02-07-2023, 06:34 PM
RE: sending data to a web server - by fbouquet - 10-17-2023, 04:40 PM
RE: sending data to a web server - by fbouquet - 10-18-2023, 01:32 PM
RE: sending data to a web server - by fbouquet - 04-17-2024, 11:20 AM
RE: sending data to a web server - by fbouquet - 04-17-2024, 03:21 PM

Forum Jump: