LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

sending data to web apps via HTTP POST

Hello, I'm in a situation with a client using LabVIEW 2010 who needs to send some data to my web app via HTTP POST.  The web app takes either form data (so what a web app developer would assume is field=value pairs) or a JSON blob.  We thought that sending HTML form style data would be easier than messing with JSON so that's what we're trying now.

 

From browsing the documentation, it seems like the POSTMultipart VI is the one we want to use.  Is that correct, or is the POST VI usable for this without wasting a bunch of effort building our own POSTDATA strings like it's 1998?

 

The problem my client is currently experiencing with the POSTMultipart VI is that it seems to be sending data all as files, instead of as field1=value1, field2=value2 in the POSTDATA as any browser does when you type data into an HTML form.  When he was previously using the POST VI, it was sending all data in the first field name.  At that point I looked into the documentation and surmised, possibly incorrectly, that the LabVIEW 2010 POST VI is too primitive (requires constructing valid POSTDATA strings, no thank you) and that the POSTMultipart VI appeared to be capable of POSTing to an HTTP endpoint.

 

Any pointers would be greatly appreciated.

0 Kudos
Message 1 of 3
(3,755 Views)

Can you share the cURL command (or a postman screenshot) you use to test your web service?

I build web apps for LabVIEW
http://chrislarson.me
0 Kudos
Message 3 of 3
(3,714 Views)