Opened 4 years ago
Closed 3 years ago
#1486054 closed Feature Requests (fixed)
Hook in http_request/http_post
| Reported by: | Technetux | Owned by: | |
|---|---|---|---|
| Priority: | 5 | Milestone: | 0.4-stable |
| Component: | Plugins | Version: | 0.3-rc1 |
| Severity: | normal | Keywords: | http_request http_post plugin hook |
| Cc: | ziba, ksteinhoff |
Description
Hello,
I've found the following event trigger extremely useful, it's basically a copy of the plugin event triggered near the top of the command function in app.js.
// trigger plugin hook
var event_ret = this.triggerEvent('httpreq_'+action, querystring);
if (typeof event_ret != 'undefined') {
// abort if one the handlers returned false
if (event_ret === false)
return false;
else
querystring = event_ret;
}
It allows plugins to either run some code when a request is sent, modify the querystring before the request is sent, or stop if from sending at all and let it's own code take over.
It would be great if this type of hook could be added to http_request and http_post but changing the prefix of the event name so plugins can tell the difference if the action is the same.
Thanks!
Ryan
Change History (1)
comment:1 Changed 3 years ago by alec
- Resolution set to fixed
- Status changed from new to closed
Note: See
TracTickets for help on using
tickets.

Added in [7ceabc88]. Event renamed to request*.