LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
0 Kudos
carlod80

better HTTP status codes in WebServices

Status: Declined

Any idea that has not received any kudos within a year after posting will be automatically declined.

When a client performs an HTTP request to a LabVIEW WebService, if the resource exists but the method is not supported (e.g. PUT instead of GET), the WebService responds with a 404-Not Found status code, giving the (wrong) impression that the resource name is wrong or non-existent. It would be better to have the service respond with a more informative 405-Method Not Allowed or 501-Not Implemented.

5 Comments
carlod80
Member

adding to this same bug report/idea exchange (not sure how to call it), there is also this issue here: https://forums.ni.com/t5/LabVIEW/REST-Error-Response-Include-BODY-data/m-p/2712055 that has been tracked with CAR 400778 since 2013.

 

Given the (almost null?) traction on these topics I wonder if there is anyone using LabVIEW WebServices for real-life, production HTTP APIs? If yes, I wonder how they manage to get useful REST-compliant services to work...

 

Also the Web Development group (https://forums.ni.com/t5/LabVIEW-Web-Development/tkb-p/7308) seems very silent.... 

wiebe@CARYA
Knight of NI

I used WebServices in LabVIEW, but decided to use .NET as HTTP server. Then you get to decide what to return all by yourself.

carlod80
Member

...which is another way to say that they are (almost) useless in production environments.

 

That's a pity, since their integration in LabVIEW could have been a very powerful tool for the IOT (not in their current implementation, though).

 

I have no idea of how .NET works, and I will probably go back to writing everything in Python, which is definitely production-ready for web services.

 

I'm quite puzzled as to why this has topic had little or no attention from NI in the last years...

wiebe@CARYA
Knight of NI

>I'm quite puzzled as to why this has topic had little or no attention from NI in the last years...

 

I guess people either use it as it is, or found a workaround...

 

I'm not sure why it is implemented in a totally new and 'alien' way. Why not provide a simple API? Just some VIs in a library (or class, preferably)...

Darren
Proven Zealot
Status changed to: Declined

Any idea that has not received any kudos within a year after posting will be automatically declined.