Company Events Academic Community Support Solutions Products & Services Contact NI MyNI

HTTP Client VIs

LabVIEW 2013 Help

Edition Date: June 2013

Part Number: 371361K-01

»View Product Info

Requires: Base Development System. This topic might not match its corresponding palette in LabVIEW depending on your operating system, licensed product(s), and target.

Use the HTTP Client VIs to build a Web client that interacts with servers, Web pages, and Web services. You can add HTTP headers, store cookies, provide authentication credentials, and send Web requests using HTTP methods such as POST, GET, PUT, HEAD, and DELETE. These VIs also can interact with LabVIEW Web services.

Palette ObjectDescription
CloseHandleCloses the client handle and deletes all stored cookies, authentication credentials, and HTTP headers associated with the client handle. This VI also terminates all HTTP connections and logs out of any authentication, if applicable.
DELETESends a Web request to delete resources on a server, Web page, or Web service. This VI uses the DELETE HTTP method. The server accepting the request from the DELETE VI must be setup to delete resources solely based upon receiving a DELETE Web request at the specified URL. Refer to the World Wide Web Consortium website at www.w3.org for more information about HTTP method definitions, including the DELETE method.
GETSends a Web request that returns headers and body data from a server, Web page, or Web service. This VI uses the GET HTTP method and does not submit any data to the server. You also can save the body data to an output file. Refer to the World Wide Web Consortium website at www.w3.org for more information about HTTP method definitions, including the GET method.
HEADSends a Web request that returns headers from a server, Web page, or Web service. This VI uses the HEAD HTTP method. This VI does not submit any data to the server or receive body data. The minimal data exchange makes the HEAD VI useful for testing the validity of a URL. Refer to the World Wide Web Consortium website at www.w3.org for more information about HTTP method definitions, including the HEAD method.
OpenHandleOpens 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.

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.
POSTSends a Web request that submits data or a file to a server, Web page, or Web service. This VI uses the POST HTTP method. Refer to the World Wide Web Consortium website at www.w3.org for more information about HTTP method definitions, including the POST method. Use the POSTMultipart VI to send POST requests using the multipart/form-data MIME type.
POSTMultipartSends a Web request that submits multiple sets of data or files to a server, Web page, or Web service. This VI uses the POST HTTP method and multipart/form-data MIME type. Refer to the World Wide Web Consortium website at www.w3.org for more information about the POST method and the multipart content type.

The POSTMultipart VI submits multiple sets of data, represented by an array of postdata clusters. The POSTMultipart VI determines which data format to accept from the client and which format to send the data to the server based upon the controls specified within each postdata cluster. Use the postdata control descriptions to configure the submitted data as one of the four available combinations. For example, the VI can accept a buffer data string from the client and send that data as a file to the server.
PUTSends a Web request that submits data or a file to a server, Web page, or Web service. This VI uses the PUT HTTP method. Refer to the World Wide Web Consortium website at www.w3.org for more information about HTTP method definitions, including the PUT method.


SubpaletteDescription
Headers VIsUse the Headers VIs to manage header field lines for Web requests associated with client handles. These VIs also can interact with LabVIEW Web services.
Security VIsUse the Security VIs to encrypt and decrypt data transfers. You also can use these VIs with the Web Services Security VIs.

 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit