From 6080c584e81927b2263267822e3ebc1e553662ec Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Thu, 12 Mar 2009 23:44:54 +0100 Subject: Action Event wrappers around HTTP requests and authentication checks Ignore-this: 9ffd0327c318a633e33a60e0a8ecf7f5 darcs-hash:20090312224454-b7b7f-12b7fa78c0b638c1795f6d5e1b1c1aa2cbab64d4.gz --- inc/HTTPClient.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'inc/HTTPClient.php') diff --git a/inc/HTTPClient.php b/inc/HTTPClient.php index f59efbaf8..7efe39a9c 100644 --- a/inc/HTTPClient.php +++ b/inc/HTTPClient.php @@ -158,6 +158,18 @@ class HTTPClient { $this->error = ''; $this->status = 0; + $httpdata = array('url' => $url, + 'data' => $data, + 'method' => $method); + $evt = new Doku_Event('HTTPCLIENT_REQUEST_SEND',$httpdata); + if($evt->advise_before()){ + $url = $httpdata['url']; + $data = $httpdata['data']; + $method = $httpdata['method']; + } + $evt->advise_after(); + unset($evt); + // parse URL into bits $uri = parse_url($url); $server = $uri['host']; -- cgit v1.2.3