HTTPRequest (v1.0)
|
PDF |
Fetches data via HTTP from user-specified addresses, and returns the
beginning of the fetched data.
With this plugin, users can fetch the content of arbitrary HTTP URLs, with
freely chosen HTTP method (GET, HEAD, etc), getting back the beginning of
the content (as much as can fit on one line).
To return specific parts of predefined URLs instead of the beginning of
user-specified ones, take a look at the
html2irc plugin.
The URL fetching in this plugin is simple and straightforward enough that
it could be usable as an example for how to fetch documents with HTTP.
The configuration file for this plugin is system/HTTPRequest/HTTPRequestConfig.xml
The command fetching an HTTP URL.
You can set the authLevel to control who is allowed to access the command.
The output is used to define where the output from the command will go.
-
authLevel - ANY, ADMIN, MASTER, TRUSTED, NONE
-
output - CHANNEL, PM, NOTICE
<commandHTTPRequest authLevel="none" output="channel">!httpreq</commandHTTPRequest>
The command for showing/setting the HTTP method used.
You can set the authLevel to control who is allowed to access the command.
The output is used to define where the output from the command will go.
-
authLevel - ANY, ADMIN, MASTER, TRUSTED, NONE
-
output - CHANNEL, PM, NOTICE
<commandHTTPRequestMethod authLevel="none" output="channel">!httpreq-method</commandHTTPRequestMethod>
The HTTP request method used if nothing else is set by the user(s).
<httpRequestMethod>GET</httpRequestMethod>
Command: !httpreq
Description: This will fetch the given URL and return as
much as it could fit on one line from the beginning of the result.
Auth Level: none
Where to give command: channel, pm
Outputs to: same as given
Example(s):
- !httpreq http://www.google.com/
Command: !httpreq-method
Description: This will show the currently set request
method, or set it to the given string.
Auth Level: none
Where to give command: channel, pm
Outputs to: same as given
Example(s):
- !httpreq-method
- !httpreq-method HEAD