LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

HTTP POST in WebVI

Hello,

This query is related to LabVIEW NXG 2.0 WebVI Module. I am trying to upload data to server using HTTP POST function in WebVI but during execution i found that its sending data to server only once then it throws an error and unable to upload on server. WebVI is simple one having a while loop and HTTP POST function with given server URL. I also tried by adding different Wait values in while loop and Timeout values in HTTP POST function. In other scenario, I used a normal VI in LabVIEW NXG 2.0 having same functionality, same logic as in WebVI and its continuously uploading data to same server URL. No error or hiccups in server connectivity. So, I want to understand what is the problem with WebVI?

 

 

 

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

Hi Ravi@arav,

 


Ravi@arav

I am trying to upload data to server using HTTP POST function in WebVI but during execution i found that its sending data to server only once then it throws an error and unable to upload on server. 

Is this an error that is output from the HTTP POST gvi? What is the error message you are seeing?

 


Ravi@arav

In other scenario, I used a normal VI in LabVIEW NXG 2.0 having same functionality, same logic as in WebVI and its continuously uploading data to same server URL. No error or hiccups in server connectivity. So, I want to understand what is the problem with WebVI?

While the HTTP Post Buffer gvi is very similar between the WebVI and Desktop, there are some important differences. When a WebVI is running in the LabVIEW NXG editor or if it is deployed and running in the web browser there are limitations on the HTTP requests that can be made.

 

You can see some of the limitations discussed in the help topic for Post Buffer on the DETAILS tab. Additionally Web Browsers are exposed to CORS restrictions as detailed in the Considerations When Accessing Data from Web Services help topic.

 

Because the Web Browser environment has stricter security requirements than applications run on the Desktop, there can be differences in behavior between the same VI running on the Desktop making HTTP Post requests and an equivalent WebVI running in NXG or a web browser and making HTTP Post requests. These security behaviors are expected and may require some changes to settings in the Server, to the WebVI block diagram, or both to fulfill the security requirements correctly.


Milan
0 Kudos
Message 2 of 2
(2,446 Views)