Custom Parameters Accepted
SendResponse will send an HTTP response to a pending HTTP request.
In practical use, the
SendResponse action is coupled with every occurrence of the
GotRequest event, which is the event that corresponds to a pending HTTP request. The
RemoteHost action parameter of SendResponse should always the same value as the
RemoteHost event parameter of the
GotRequest event in order for the response to be sent back to the correct request.
If one is sending back Cisco IP Phone XML as the
Body of the response, note that the Cisco IP Phone XML variable must be passed in as a
C# parameter, and the variable must have the
ToString() method invoked on it, for instance,
myXmlVar.ToString(). The Cisco IP Phone XML variable can not be passed in directly to the
Body action parameter; it must be converted to a string before it is sent to the HTTP Provider. Also, be sure to set the
Content-Type variable to the value
text/xml if you are communicating with a Cisco IP Phone.
One can specify custom action parameters for this action. Any custom action parameter is converted to a header in the HTTP response. For example, with this mechanism, one can send back a cookie by specifying a custom action parameter with the name
Set-Cookie and the appropriate, cookie-formatted value.
Many web development environments allow one to specify a numeric value for the
Expires header, which is treated as an offset in minutes of the current time. The HTTP Provider does not support this simple, numeric notion. The value of the
Expires header is passed through directly to the HTTP response, requiring the developer to format the
Expires header in conformance with the HTTP specification. One can use the
System.DateTime class to generate this properly formatted string. For instance, a value for the
Expires header that would indicate to the web client that the page is expired already could be
One must use the
SendResponse action within
5 minutes of receiving
GotRequest; otherwise, the HTTP provider will send back a response automatically to the client with a response code of
404 and the script will have lost its opportunity to respond to the request.
|Parameter Name||.NET Type||Default||Description|
|RemoteHost *||The IP address and port of the remote client, of the form IP:PORT. This correct value for this field is obtainable from the |
|ResponsePhrase||The response phrase of the HTTP response which corresponds to the |
|Body||The content of the response.|
|ResponseCode *||The numeric code of the HTTP response, such as |
No Result Data