Web Client DAT
The Web Client DAT allows you to send HTTP requests to web servers from TouchDesigner. It supports GET, POST, PUT, DELETE, HEAD, OPTIONS and PATCH http methods.
The Web Client DAT supports various authentication types such as: basic, oauth1, oauth2.
The Web Client DAT allows for streaming from web servers.
The Web Client DAT sends HTTP requests to web servers and then outputs the response in the DAT. With streaming enabled it can stream data from a web server.
When streaming is enabled, Clamp Output as Rows should be enabled. This turns the output of the DAT into a FIFO table instead of raw text. Only the last N lines will be displayed, where N is the value of the Maximum Lines parameter. This will prevent the text in the DAT from getting too larger and will keep cook-times down as a result.
The Web Client DAT supports sending of GET, POST, PUT, DELETE, HEAD, OPTIONS, and PATCH request methods. The Web Client DAT also supports 4 authentication methods: Basic, Digest, OAuth1, and OAuth2.
The first input is the extra headers to send in the request. It should be a table with 2 columns, structured as name/value pairs. For example:
The second input is the additional options to send in the request. These are query parameters which will be appended to the URL. This can be a table with two columns, structured as name/value pairs. It can also just be text, in which case it will append as-is. Example input:
The Web Client DAT is the successor to the Web DAT.
Parameters - Web Client Page
active - Toggles the operator on/off.
reqmethod - ⊞ - Selects the HTTP request method.
get- The GET method requests a representation of the specified resource. Requests using GET should only retrieve data.
post- The POST method is used to submit an entity to the specified resource, often causing a change in state or side effects on the server.
put- The PUT method replaces all current representations of the target resource with the request payload.
delete- The DELETE method deletes the specified resource.
head- The HEAD method asks for a response identical to that of a GET request, but without the response body.
options- The OPTIONS method is used to describe the communication options for the target resource.
patch- The PATCH method is used to apply partial modifications to a resource.
url - The URL of the server to send the HTTP request
uploadfile - The contents of the upload file will be sent to the server (chunked, if necessary).
request - Sends the request
stop - Stops the stream of data from the server.
stream - Enables streaming. This is only necessary to enable if the server support streaming.
Verify Certificate (SSL)
verifycert - Enables TLS (transport layer security) certificate verification.
timeout - Timeout of the request if no response is received from the web server.
Include Header in Output
includeheader - Includes the header in the output of the response.
async - Enables asynchronous sending/receiving (ie. TouchDesigner doesn't hang while waiting for a response from the web server).
Parameters - Authentication Page
authtype - ⊞ - The type of authentication.
none- No authentication
basic- Basic authentication is base-64 encoded username and password.
digest- Digest authentication is base-64 encoded username and password that's encrypted with a hashing function. Digest is a more secure version of Basic authentication.
ouath1- Version 1 of OAuth. OAuth1 requires App Key, App Secret, User OAuth Token, and User OAuth Secret. These can be found via the account on the web server that request is being sent to. For example, in the case of the Twitter API the values of these 4 parameters can be found under the account profile.
ouath2- Version 2 of OAuth. OAuth2 first requires an HTTP request be sent to the web server to acquire the Client ID and token. It can be acquired using a browser.
username - Username used in Basic/Digest authentication.
pw - Password used in Basic/Digest authentication.
appkey - OAuth1 App Key retrieved from web server.
appsecret - OAuth1 App Secret retrieved from web server.
User OAuth Token
oauthtoken - OAuth1 user token retrieved from web server.
User OAuth Secret
oauthsecret - OAuth1 user secret retrieved from web server.
clientid - OAuth2 Client ID retrieved from web server.
token - OAuth2 token retrieved from web server.
Parameters - Output Page
clear - Clears the output of the DAT.
Clamp Output as Rows
clamp - When enabled, the output of the DAT is table instead of text. The rows will also be clamped to Maximum lines parameter value. This should be enabled when streaming is enabled too ensure that the output does not get too large.
maxlines - The maximum number of rows when clamping is enabled.
callbacks - The Callbacks DAT.
Parameters - Common Page
language - ⊞ - Select how the DAT decides which script language to operate on.
input- The DAT uses the inputs script language.
node- The DAT uses it's own script language.
extension - ⊞ - Select the file extension this DAT should expose to external editors.
dat- various common file extensions.
- From Language
language- pick extension from DATs script language.
- Custom Extension
custom- Specify a custom extension.
customext - Specifiy the custom extension.
wordwrap - ⊞ - Enable Word Wrap for Node Display.
input- The DAT uses the inputs setting.
on- Turn on Word Wrap.
off- Turn off Word Wrap.
- Input 0 -
- Input 1 -
|• • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • •|