TrafficScript Syntax
TrafficScript is the scripting language provided by the Traffic Manager. An administrator can create TrafficScript rules to process requests, implementing suitable logic to ensure that requests are handled in the most appropriate way. TrafficScript is similar to many other programming or scripting languages, such as C or Perl. This chapter describes the syntax of the language.
Statements
A command in TrafficScript is called a statement. Each statement ends with a semicolon (;), and a TrafficScript rule typically contains several statements.
http.setHeader( "Host", "secure.mysite.com" );
pool.use( "mypool" );
Any text between a hash (#) and the end of the line is called a comment and is ignored.
# Write a message to the event log file
log.info( "Starting to run rule now!" );
$body = http.getBody( ); # get the POST data