Table Of Contents

POST File (G Dataflow)

Last Modified: January 12, 2018

Sends data within the file input to the URL you specify.

This node uses the POST HTTP method. Unlike a PUT request, POST requests do not require all available property and attribute values when updating a resource. You can choose to send all values to update the entire resource or just a subset of the available values.

connector_pane_image
datatype_icon

output file

File to save body data returned by the server. If you do not specify an output file, the node does not save the body data to a file.

datatype_icon

client handle

Unique value that identifies the web request. You can use the same client handle to wire together multiple HTTP nodes to preserve authentication credentials, HTTP headers, and cookies. Client handles are not required when making independent web requests without persistent data such as headers or credentials.

Default: 0

datatype_icon

url

URL of the server, web page, or web service where this node will send the web request.

Relative URL behavior

If you do not specify a URL scheme on a Web Server target, each URL you enter is relative to the location the WebVI is hosted. The WebVI sends HTTP requests to the server at the relative URL. For example, if you host the WebVI on http://website.com/MyApp/, specifying the relative URL subdirectory/myfile.txt sends an HTTP request to http://website.com/MyApp/subdirectory/myfile.txt.

If you do not specify a URL scheme on a non-Web Server target, the node prefixes http:// to the URL and treats it as an absolute URL.

datatype_icon

file

The file path of the file to send to the server as data. This node extracts the data from that file and sends the data to the server.

datatype_icon

error in

Error conditions that occur before this node runs.

The node responds to this input according to standard error behavior.

Standard Error Behavior

Many nodes provide an error in input and an error out output so that the node can respond to and communicate errors that occur while code is running. The value of error in specifies whether an error occurred before the node runs. Most nodes respond to values of error in in a standard, predictable way.

error in does not contain an error error in contains an error
If no error occurred before the node runs, the node begins execution normally.

If no error occurs while the node runs, it returns no error. If an error does occur while the node runs, it returns that error information as error out.

If an error occurred before the node runs, the node does not execute. Instead, it returns the error in value as error out.

Default: No error

datatype_icon

timeout

Amount of time in milliseconds you must wait to obtain a response from the server before the web request times out. A value of -1 defers timeout monitoring to the operating system.

Default: 10000 ms

datatype_icon

status code

Status code information returned by the server.

datatype_icon

client handle out

Unique value that returns data back to the node. You can use the same client handle to wire together multiple HTTP nodes to preserve authentication credentials, HTTP headers, and cookies. Client handles are not required when making independent web requests without persistent data such as headers or credentials.

datatype_icon

headers

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.

datatype_icon

body

Body data that is returned by the server.

datatype_icon

error out

Error information.

The node produces this output according to standard error behavior.

Standard Error Behavior

Many nodes provide an error in input and an error out output so that the node can respond to and communicate errors that occur while code is running. The value of error in specifies whether an error occurred before the node runs. Most nodes respond to values of error in in a standard, predictable way.

error in does not contain an error error in contains an error
If no error occurred before the node runs, the node begins execution normally.

If no error occurs while the node runs, it returns no error. If an error does occur while the node runs, it returns that error information as error out.

If an error occurred before the node runs, the node does not execute. Instead, it returns the error in value as error out.

Web Server Details

CORS Restrictions on HTTP Requests

Requests from HTTP clients are subject to CORS restrictions when the WebVI communicates with a web service on a different origin. The web service responding to the HTTP request must return a valid CORS configuration for the HTTP request to complete successfully.

On non-Web Server targets, HTTP requests are not subject to CORS restrictions. The VI can make HTTP requests regardless of the CORS configuration of the server.

spd-note-note
Note  

If an HTTP request fails on the Web Server target, the HTTP node returns the generic network error code 363650 because it cannot track the exact cause of the failure. You must use the output tab or developer tools specific to the browser to gather additional information about the cause of the failure.

Cached Response Behavior for Repeat Requests

HTTP nodes on a Web Server target may create caches of responses to HTTP requests. If a duplicate request occurs, the HTTP nodes can avoid querying the network by returning a previous response from the cache. The specific browser environment and server configuration determine the behavior of the cache.

On non-Web Server targets, every HTTP request creates a unique network request.

Forbidden Headers on a Web Server

A WebVI cannot transmit or receive specific forbidden headers in HTTP requests. For header transmissions, the request to the server does not include forbidden headers. When the HTTP nodes receive a forbidden header from a server, they exclude the header from the headers output. Additionally, the CORS configuration of a server may exclude some headers in server requests or from server responses.

On non-Web Server targets, you do not need to account for forbidden headers in HTTP requests.

Default Content-Type for HTTP Request

If you do not specify a Content-Type header for an HTTP request, this node adds the application/x-www-url-formencoded Content-Type header to the request by default.

Where This Node Can Run:

Desktop OS: Windows

FPGA: This product does not support FPGA devices

Web Server: Not supported in VIs that run in a web application


Recently Viewed Topics