6.3.1.2. smsprovider.HttpSMSProvider module¶
This is the SMSClass to send SMS via HTTP Gateways
- class smsprovider.HttpSMSProvider.HttpSMSProvider[source]¶
Bases: smsprovider.SMSProvider.ISMSProvider
- get_proxy_info(proxy)[source]¶
helper to parse the proxyurl and to create the proxy_info object
Parameters: proxy – proxy url string Returns: ProxyInfo object
- httplib_request(url, parameter, username=None, password=None, method='GET')[source]¶
build the urllib request and check the response for success or fail
Parameters: - url – target url
- parameter – additonal parameter to append to the url request
- username – basic authentication with username (optional)
- password – basic authentication with password (optional)
- method – run an GET or POST request
Returns: False or True
- submitMessage(phone, message)[source]¶
send out a message to a phone via an http sms connector :param phone: the phone number :param message: the message to submit to the phone
- urllib_request(url, parameter, username=None, password=None, method='GET')[source]¶
build the urllib request and check the response for success or fail
Parameters: - url – target url
- parameter – additonal parameter to append to the url request
- username – basic authentication with username (optional)
- password – basic authentication with password (optional)
- method – run an GET or POST request
Returns: False or True