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. |
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.
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 output 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. |
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.
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.