LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Asynchronous HTTP GET?

Can anyone suggest a way to make a HTTP "GET" request asynchronously?  That is, I'd like to be able to make the request, poll it's status, and then handle it once complete.  Specifically, I'd like to be able to abort the request at any point before it completes.

 

Currently, I'm using GET.vi from the LabVIEW HTTP client library.  This VI appears to only work synchronously.  That is, it does not return until it either receives the complete response or times out.  This results in my application appearing to "hang" at exit since, short of aborting the VI, I have no way to terminate a request which is currently in progress.

0 Kudos
Message 1 of 2
(2,762 Views)

Hi Mark,

I think what you want would be possible by asynchronously calling a VI which uses the GET.vi, or possibly asynchronously calling the GET.vi itself. This help page is a good introduction to "call-and-collect" asynchronous VI usage, and includes a discussion of aborting VIs called this way as well. 
http://zone.ni.com/reference/en-XX/help/371361N-01/lvhowto/acbr_call_and_collect/

Depending on exactly what you intend to accomplish, this may be what you are looking for. 

Charlie J.
National Instruments
0 Kudos
Message 2 of 2
(2,751 Views)