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

POST VI

LabVIEW 2013 Help

Edition Date: June 2013

Part Number: 371361K-01

»View Product Info

Owning Palette: HTTP Client VIs

Requires: Base Development System

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

You can assign a client handle to add authentication credentials, HTTP headers, or a cookie to Web requests made by the POST VI. Use the OpenHandle VI to open a client handle and establish credentials. Use the AddHeader VI to add header lines to Web requests made by the POST VI.

Details  

Use the pull-down menu to select an instance of this VI.

POST (Buffer)

output file specifies a file to save body data returned by the server. If you do not specify an output file, the VI does not save the body data to a file.
client handle specifies the client handle to associate 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.
URL specifies the URL of the server, Web page, or Web service which this VI sends the Web request.
buffer specifies a string of data to send to the server.
error in describes error conditions that occur before this node runs. This input provides standard error in functionality.
timeout specifies the amount of time in milliseconds to wait for a response from the server before the Web request times out. The default value is 10000 ms. A value of -1 defers timeout monitoring to the operating system.
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.
headers returns the header fields returned by the server. Refer to the World Wide Web Consortium website at www.w3.org for more information about header field definitions including available headers, descriptions, and syntax.
body returns body data returned by the server.
error out contains error information. This output provides standard error out functionality.

POST (File)

output file specifies a file to save body data returned by the server. If you do not specify an output file, the VI does not save the body data to a file.
client handle specifies the client handle to associate 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.
URL specifies the URL of the server, Web page, or Web service which this VI sends the Web request.
file specifies the file path of the file to send to the server as data. This VI extracts the data from that file and sends the data to the server.
error in describes error conditions that occur before this node runs. This input provides standard error in functionality.
timeout specifies the amount of time in milliseconds to wait for a response from the server before the Web request times out. The default value is 10000 ms. A value of -1 defers timeout monitoring to the operating system.
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.
headers returns the header fields returned by the server. Refer to the World Wide Web Consortium website at www.w3.org for more information about header field definitions including available headers, descriptions, and syntax.
body returns body data returned by the server.
error out contains error information. This output provides standard error out functionality.

POST Details

Using the POST VI with LabVIEW Web Services

Use this VI to interact with a LabVIEW Web service. First, you must create and publish a Web service, including the setup of a URL map to accept the POST method. You can then use the POST VI to connect to that Web service by specifying a URL that corresponds to the Web service.


 

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