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.

Methods

get   get_proxy   new   proxy_required  

Public Class methods

Public Instance methods

uri:uri to query (Uri object)
readtimeout:timeout for reading the response
opentimeout:timeout for opening the connection

simple get request, returns response body if the status code is 200 and the request doesn’t timeout.

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.

if http_proxy_include or http_proxy_exclude are set, then examine the uri to see if this is a proxied uri the in/excludes are a list of regexps, and each regexp is checked against the server name, and its IP addresses

[Validate]