Templates for HTTP GET Carriers

Top  Previous  Next

Templates for HTTP GET carriers tell PageGate what variables and data to declare in the URL passed to the API.

 

All variables are declared in the 'Text' section of the template as follows:

|<name1>|<value1>|

|<name2>|<value2>|

etc.

 

Each value you specify will need to correspond to a variable that the receiving API will recognize. For example, let's say we wanted to send a message to an API that looked for to, from, subject and text as variables. We would need to format the text template as follows:

 

|to|%RecipientId%|

|from|%Sender%|

|subject|%Subject%|

|text|%Message%|

 

NOTE: | a pipe character.

 

The following parameters can be specified in the 'Settings' section of an HTTP GET carrier

Variable

Possible Values

Description

BodyMaxChars

Numeric

Example: BodyMaxChars = 200

 

This parameter limits the length of the %Message% macro and does not override the carrier "Max Chars" setting.

Filter

File path to and file name of the filter to run

Note: pgfilter.exe and pgfilter.dll must reside in the PageGate program directory to use this parameter.

 

Example:  Filter = c:\PageGateData\Filters\yourcarrierfilter.xml

 

This parameter calls on PageGate's filtering system when sending and receiving SMS through this carrier. This allows for the sorting and modification of both outbound messages and replies and is an integral part of two-way messaging.

FilterDebugFile

File path to and file name of the log to write

Example: FilterDebugFile = c:\PageGateData\Filters\outboundfilter1.log

 

When using a filter, you can use this variable to output this specific filter's log to the specific location and file name.

From

Text

Example: From = CAD

 

This parameter overrides the value passed to PageGate by the input modules/APIs. By specifying this variable, you're telling PageGate to use a single, standardized sender's name for all traffic controlled by this template.

HttpErrorResponse

Command String

See Description

NOTE: This parameter's routine only engages when receiving a 200 class response from the web server.

 

This variable tells PageGate to scan for the specified keywords or keyphrases in responses to a GET requests made by this carrier. If those keywords or keyphrases are found, the message is treated as failed or rejected, depending on what you specify.

 

This variable is both case and punctuation sensitive and PageGate will look for an exact match to what you enter.

 

Multiple search terms may be used and must be separated by a pipe.

 

For example, this would only scan for the word failed:

HttpErrorResponse = failed

 

This would scan for the word failed in the <Reply> tag:

HttpErrorResponse = <Reply>failed</Reply>

 

This would scan for the word reject or the word failed in the <Reply> tag:

HttpErrorResponse = reject|<Reply>failed</Reply>

 

This would scan for the word failed OR the word reject OR the phrase object not found:

HttpErrorResponse = failed|reject|object not found

 

Any response from the web server that includes the search term(s) will be treated as a failure.

HttpProtocol

HTTPS

HTTP

Example: HttpProtocol = HTTPS

 

This parameter forces the use of HTTPS regardless of the port used to connect.

HttpResponseTimeout

Milliseconds

Example: HttpResponseTimeout = 1000

 

This variable forces PageGate to wait for the specified number of milliseconds (1000 = 1 second) for a response to the HTTP communication request.

HttpSuccessResponse

Command String

See Description

NOTE: This parameter's routine only engages when receiving a 200 class response from the web server.

 

This variable tells PageGate to scan for the specified keywords or keyphrases in responses to a GET requests made by this carrier. If those keywords or keyphrases are found, the message is treated as failed or rejected, depending on what you specify.

 

This variable is both case and punctuation sensitive and PageGate will look for an exact match to what you enter.

 

Multiple search terms may be used and must be separated by a pipe.

 

For example, this would only scan for the word success:

HttpSuccessResponse = success

 

This would scan for the word Acknowledged in the <Reply> tag:

HttpSuccessResponse = <Reply>Acknowledged</Reply>

 

This would scan for the word hijinks or the word Acknowledged in the <Reply> tag:

HttpSuccessResponse =hijinks|<Reply>Acknowledged</Reply>

 

This would scan for the word success OR the word hijinks OR the word actualization:

HttpSuccessResponse = success|hijinks|actualization

 

Any response from the web server that includes the search term(s) will be treated as a success.

InterMessageDelay

Milliseconds

Example: InterMessageDelay = 1000

 

This variable inserts a pause, in milliseconds, in between each message that is delivered. It could be possible for PageGate to send a large number of data requests too quickly and this prevents that from happening.

ParameterDelimiter

See Description

Example: ParameterDelimiter = !

 

Message templates for HTTP GET carriers usually involve parameter + variable pairs that are declared in this format:

|parameter|variable|

 

ParameterDelimiter allows you to change the 'wrapping' character from a pipe (|) to something else, like an exclamation mark (!).

ResponseIncludeRequest

True

False

Example: ResponseIncludeRequest = True

 

Setting this parameter to true tells PageGate to include the original request sent to the API when recording responses.

ResponsePath

File Path

Example: ResponsePath = c:\PageGateData\APIResponses\

 

This parameter allows you to specify the folder that responses should be written to. If API responses do not need to be tracked, this parameter is not required.

ResponseRecipient

Recipient

 

Group

Example: ResponseRecipient = groupname

 

When the HTTP GET or POST transaction completes, the specified recipient or group will receive any responses from the receiving API/web host. For more information, please see the Two Way Messaging section of the documentation.

StripAlpha

True

False

Example: StripAlpha = True

 

Setting this value to true will remove any alphabetical character from messages delivered through this carrier. For example, if you tried to send the message 'Alert on node 127.0.0.1', the only thing delivered would be '127.0.0.1'

StripCharacters

See description

Example: StripCharacters = |\~

 

This parameter will remove all instance of any character(s) entered. In the above example, that would strip out all pipes (|), backslashes (\) and tildes (~).

StripNonPrintable

True

False

Example: StripNonPrintable = True

 

Settings this value to true will remove any non-printable ASCII characters, like carriage returns, line feeds, horizontal tabs and similar, from messages delivered through this carrier.

To

Text

To = 7818290500

 

This variable overrides the ID/PIN or Email values. By specifying this variable, you're telling PageGate to send all traffic processed by this template to the specified ID or Email address instead.

UseFilterDll

True

False

Note: pgfilter.exe and pgfilter.dll must reside in the PageGate program directory to use this parameter.

 

Example: UseFilterDll = True

 

Setting this parameter to true tells PageGate to use the filter dll, which is a more efficient method of running the filter.