POSTMultipart VI

Owning Palette: HTTP Client VIs

Requires: Base Development System

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

The POSTMultipart VI submits multiple sets of data, represented by an array of postdata clusters. 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.

Details  

 Add to the block diagram  Find on the palette
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.
data is the array of clusters specifying the data attributes and values to submit to the server. 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 data.
Name specifies a name for the submitted data. This control is required for all Web requests with buffer data or files.
Value specifies the buffer data string to submit to the server. Assign a Value and do not assign a File to configure the VI to accept a buffer data string as the source data.
File specifies the location of the file source to submit to the server. Assign a File and do not assign a Value to configure the VI to accept a file as the source data.
Filename specifies a filename to save the submitted data on the server. Assign a Filename to instruct the server to save the source data as a file. If you do not assign a Filename, the server saves the source data as a buffer data string.
MIME Type specifies the MIME type for the Web request. The default value is application/octet-stream.
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.

POSTMultipart Details

The POSTMultipart VI can submit either buffer data, such as a string, or a file from the client. The VI can then instruct the server to save the accepted data as either server-side buffer data or a file. 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. The following screenshot shows four clusters, each configured as one of four available client-side/server-side combinations.

Refer to the World Wide Web Consortium website at www.w3.org for more information about the POST method and the multipart content type.