OpenHandle VI

LabVIEW 2018 Help


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

DOWNLOAD (Windows Only)


LabVIEW 2015 Help
LabVIEW 2016 Help
LabVIEW 2017 Help
LabVIEW 2018 Help
LabVIEW 2019 Help

Owning Palette: HTTP Client VIs

Requires: Base Development System

Opens a client handle. Use client handles to wire together multiple HTTP Client VIs while preserving authentication credentials, HTTP headers, and cookies. You can specify a username and password, if necessary, to send Web requests to a server that requires authentication. You also can create a cookie file that stores data across multiple Web requests.

Details  

cookie file is the path to store a client-side cookie. Cookies store data across multiple Web requests.
username specifies the log-in username for the HTTP server you created earlier.
password specifies the log-in password for the HTTP server.
error in describes error conditions that occur before this node runs. This input provides standard error in functionality.
verify server (true) specifies whether to verify the server's identity and establish a secure connection. Use this control to allow HTTP Client VIs to communicate using the https:// protocol. The default value is TRUE.
client handle out returns the client handle associated with the Web request. Use client handles to wire together multiple HTTP Client VIs while preserving authentication credentials, HTTP headers, and cookies. Client handles are not required when making independent Web requests without persistent data such as headers or credentials.
error out contains error information. This output provides standard error out functionality.

OpenHandle Details

Client handles increase network efficiency by limiting the number of network sockets and ports necessary to perform multiple Web requests. Client handles are not required when making independent Web requests without persistent data such as headers or credentials.

The following screenshot shows code that performs the following:

  1. The OpenHandle VI opens a client handle and a client-side cookie that can store persistent data.
  2. The AddHeader VI adds a new header field line that sets the preferred language for subsequent Web requests associated with the client handle.
  3. The GET VI performs a Web request that includes the Accept-Language header.
  4. The CloseHandle VI closes the client handle and deletes any persistent data, including headers.

WAS THIS ARTICLE HELPFUL?

Not Helpful