Perform an Action
To send an action to the ACI server, you must create a Command
object. This object stores information about the action that you want to run, including all the parameters that the action requires. For an example of how to create a Command
object, see Create an Action.
Create an Action
The following example shows how to create a Command
object for the IDOL server query action. The action is Query
and it sets the parameters Text
, LanguageType
, and TotalResults
.
Command query = new Command("query"); query.Set("text", "Reducing heart attack risk"); query.Set("LanguageType", "English"); query.Set("TotalResults", true);
Set the HTTP Request Method
The HTTP request method used to send the action is defined by the connection object. If you want to change the request method from the default, pass different HTTP settings into the constructor of this object. For an example, see Create a Connection. For more information about the HTTP settings you can change, refer to the .NET ACI API reference documentation.