HTTP (Magic xpi 3.x)
The HTTP component allows the Magic xpi Server to send and receive HTTP requests from a Web server. The HTTP component is used in two ways:
As a step in a flow: The HTTP component is used to send and receive information using various HTTP methods. The HTTP component supports the Get, Post, and Rest HTTP methods. When you select the Post or Get operations, you must specify a URL. The HTTP component will request that the server carry out your request to the requested URL.
-
In the Post method, the component will post information to the indicated URL. This method is often used to post information to a use bulletin board add a file to a directory. You must also specify header information when using this method.
-
In the Get method, the requested URL is retrieved and sent back to the requester. The requested information is returned in the User BLOB.
As a trigger component: The HTTP trigger component is used to trigger a flow and also allows passing parameters through the Web. A flow is triggered when the HTTP component receives a request from the Web. The request is sent in a specific syntax and includes the arguments and parameters that are to be updated.
To fetch the HTTP request body:
-
Ensure that the <Magic xpi>/scripts/config/mgreq.ini file's HttpVars entry is enabled and that it contains MG_POST_BODY.
-
In the flow, the C.HTTP_Body context variable will hold the HTTP body content when the flow is invoked by the HTTP trigger.
|
There is a sample project available for this component. If you selected the Options screen's Install Sample Projects check box during the installation, you will find the sample project at: [Magic xpi installation]\Sampleprojects
|
|
HTTP – Prerequisites
HTTP – Configuration
HTTP – Error Codes