From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Example Code

Easy HTTP Client VIs

Code and Documents

Attachment

Introduction:

I found myself continually performing the same operations in conjunction with the HTTP Client VIs in LabVIEW.  I was always parsing the header, checking for 500 errors, and the like.  Eventually I wised up and created these VIs that do all of that for you!

Steps to Complete:

The VIs are all in a single VI Package.  The new pallete will include new versions of the HTTP Client VIs as well as a subpallete that contains the VIs native to LabVIEW.  The pallete is also located on the top level of the functions pallete; I found the native location in LabVIEW very inconvenient.

HTTP_Client_Pallete.png

Enjoy!

Additional Notes:

The Easy HTTP Client VIs can be differentiated from the native LabVIEW VIs by the wrench in the upper right hand corner of the VI icon.

Applications Engineer
National Instruments

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Comments
Peter-daq.io
Member
Member
on

Hey everyone,

does anyone still maintain this project? We found an error on other system locales (decimal point is a comma, for instance): "Interpret header.vi" will throw an error for the http version. Fix: force the locale to a decimal "point" by adding '%.;' to the "Scan from String" parameter.

Other than that, great package, very useful and handy!

PeterInterpret Header fix.png

CLD | Alliance Partner | Web data storage and visualization | daq.io
alekennedy
Member
Member
on

Hi,

When I send a POST Request with content-type application/json,  I get a Response Code 100 and the library show me an error code 800100. Can anybody help me?

 

brentjustice
Member
Member
on

I was inspired by this code, but I kept bumping into issues with it, so I created my own branch.

I improved a few things and added debug log hooks.

If you are interested::

https://www.vipm.io/package/blue_origin_lib_blue_easy_http_client_opensource/

Contributors