LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Http communication problem (GET / POST)

I am developing a LabVIEW program that communicates with a web server via http protocol. I'm using  "URL Get HTTP Document " vi (part of LabVIEW Internet Toolkit) to make it possible. This vi gives support only to "GET method", in wich the message is sent in the URL. This method has a maximum size of 1024 characters, compelling me to truncate some messages. I think National could modify this vi to include support to "POST method" (without maximum size). What do you think about it? Does anyone have some idea?

Thanks.

My regards,
Vinicius Falseth
0 Kudos
Message 1 of 5
(2,985 Views)
You don't need to wait for NI to do that for you. The VIs in the Internet Toolkit aren't protected, so just make a copy of it and modify it to your needs ("POST" instead of "GET"). Just from a quick look at it I didn't see where the string gets limited to 1024 characters.But you can as well just use only parts of "URL Get HTTP Document" and create your own VI (maybe with an input to define the method GET or POST).
Anyway, note that the "
URL Get HTTP Document" doesn't support proxys. If you're behind a proxy, this won't work. That's why I had to write my own VIs to communicate with a Webserver some time ago. But we used a special protocol so that won't help you much.

Hope this gives you some ideas
Daniel

Message Edited by dan_u on 10-26-2005 02:55 PM

0 Kudos
Message 2 of 5
(2,982 Views)
Hello Daniel. Thanks for you ideas. I know it's possible to modify the vi's in the toolkit. However, I don't want to make this because it may cause a lot of  "collateral effects" in the future. The limitation of 1024 characters is imposed by a lot of popular servers, like Tomcat. You could read http specification at http://www.faqs.org/rfcs/rfc2616.html
It would be very helpful an answer from a National engineer.

My regards,
Vinicius.

0 Kudos
Message 3 of 5
(2,976 Views)
Vinicius,
I'm inclined to agree with Daniel. We purposefully don't lock the toolkit vis so that you can save them as a different name and then edit them to your needs. If you save a copy of the toolkit vi and edit that vi, the original is untouched and the "collateral effects" you mentioned should be nullified. However, we're always up for product suggestions! We love to hear what our customers are doing and how we can improve our products. Would you be willing to make a suggestion at our Product Suggestion Center?
 
 
Best Regards,
 
Chris C
Applications Engineering
National Instruments
0 Kudos
Message 4 of 5
(2,954 Views)
I'm sorry Chris, but I disagree with you. The original vi has treatment for all possible exceptions that may occur. If I update this vi, it may cause a lot of new (and not treated) exceptions. So, those "collateral effects" wouldn't be nullified. I think it's a simple job for National team.

Best regards,
Vinicius Falseth
0 Kudos
Message 5 of 5
(2,950 Views)