HTTP Server Connector
Note: You should use the HTTP Server2
Connector, as HTTP Server Connector described below is an old version.
Overview
The HTTP server Connector listens for incoming HTTP connections and returns
the GET parameters as an entry. If a Parser is specified then the Connectors
will process POST requests and parse the contents using the specified Parser.
GET requests will not use the Parser. If a POST request is received and no Parser
is specified the contents of the POST data will be returned as an
attribute ("postdata") in the returned entry.
The Connector will parse URL requests and populate an entry in the following
manner:
If a POST request is used then it is expected that the requestor is sending
data on the connection as well. Depending on the value for the parser
parameter the Connector will do the following:
Parser Present? |
Action |
Yes |
Instantiate the Parser with the HTTP input stream. Connector
will delegate getNext to the Parser's getEntry and return whatever the Parser
returns. |
No |
Put contents of post data in a attribute called postdata.
entry.postdata = "<post data>" |
The session with the HTTP client is closed when the Connector receives a
getNext request from the AssemblyLine and there is no more data to fetch. I.e.
if the Parser has returned a null value, or on the second call to getNext if no Parser
is present. If you call getNext (i.e. iterate) after having received a
null from the Connector.
Configuration
The Connector needs the following parameters:
Parameter |
Description |
connectorType |
com.architech.connector.rscHttpServer |
port |
The TCP port to listen to (default = 80) |
parser |
The name of a Parser to handle the contents of
POST requests |
Downloads
Included in base product
See Also
URL Connector, HTTP
Server2 Connector
|