| Class | Irc::Utils::HttpUtil |
| In: |
lib/rbot/httputil.rb
|
| Parent: | Object |
class for making http requests easier (mainly for plugins to use) this class can check the bot proxy configuration to determine if a proxy needs to be used, which includes support for per-url proxy configuration.
| uri: | uri to query (Uri object) |
| readtimeout: | timeout for reading the response |
| opentimeout: | timeout for opening the connection |
simple get request, returns (if possible) response body following redirs and caching if requested if a block is given, it yields the urls it gets redirected to TODO we really need something to implement proper caching
gets a page from the cache if it’s still (assumed to be) valid TODO remove stale cached pages, except when called with noexpire=true
| uri: | Uri to create a proxy for |
return a net/http Proxy object, which is configured correctly for proxying based on the bot’s proxy configuration. This will include per-url proxy configuration based on the bot config +http_proxy_include/exclude+ options.