Configuring HTTP Headers, Streaming, and Buffering (Real-Time, Windows)

LabVIEW 2018 Help


Edition Date: March 2018
Part Number: 371361R-01
View Product Info

DOWNLOAD (Windows Only)


LabVIEW 2016 Help
LabVIEW 2017 Help
LabVIEW 2018 Help
LabVIEW 2019 Help
LabVIEW 2020 Help

Parent Topic: Developing HTTP Method VIs

Note  For more information about concepts in this topic, refer to the Web services introduction and tutorial. LabVIEW Web services are available only in the LabVIEW Full Development System and the LabVIEW Professional Development System.

Streaming Data

You can stream output data to a client from an HTTP method VI. Use the stream output type to return data from an HTTP method VI in a customized format. You can configure the HTTP method VI to use the stream output type on the HTTP Method VI Settings page of the Web Service Properties dialog box.

Use the Write Response VI to create the stream output data, such as a customized HTML page or image data. You can also use ESP scripting to stream customized output to the client.

Use the Set HTTP Response Code VI and the Set HTTP Response MIME Type VI to customize the response code and MIME type of the stream ouput data.

Note  Instead of streaming data to a client in a custom format, such as a customized HTML page or image data, an HTTP method VI can return data to a client via the connector pane.

Configuring HTTP Headers

You can customize the HTTP headers of the response from an HTTP method VI to a web client. Use the Set HTTP Header VI and the Set HTTP Redirect VI to customize HTTP headers for HTTP method VIs using the stream output type. For example, you can create a custom header that refreshes the web page displayed in a web browser every two seconds. If you do not customize the HTTP headers of the HTTP method VI, the HTTP method VI uses default headers for the response.

Buffering Streaming Data

You can configure an HTTP method VI to buffer the stream output data. Use the Write Response VI to create either buffered or unbuffered stream output data. Use the HTTP Method VI Settings page of the Web Service Properties dialog box to configure an HTTP method VI to buffer the stream output data.

Data Communication Methods Home

WAS THIS ARTICLE HELPFUL?

Not Helpful