Class: JPush::NativeHttpClient
- Inherits:
-
Object
- Object
- JPush::NativeHttpClient
- Defined in:
- lib/jpush/http_client.rb
Instance Method Summary collapse
-
#initialize(maxRetryTimes = 5) ⇒ NativeHttpClient
constructor
A new instance of NativeHttpClient.
- #sendGet(url, content, authCode) ⇒ Object
- #sendPost(url, content, authCode) ⇒ Object
Constructor Details
#initialize(maxRetryTimes = 5) ⇒ NativeHttpClient
Returns a new instance of NativeHttpClient.
11 12 13 14 |
# File 'lib/jpush/http_client.rb', line 11 def initialize(maxRetryTimes = 5) @maxRetryTimes = maxRetryTimes @logger = Logger.new(STDOUT) end |
Instance Method Details
#sendGet(url, content, authCode) ⇒ Object
20 21 22 |
# File 'lib/jpush/http_client.rb', line 20 def sendGet(url, content, authCode) return sendRequest(url, content, 'GET', authCode) end |
#sendPost(url, content, authCode) ⇒ Object
16 17 18 |
# File 'lib/jpush/http_client.rb', line 16 def sendPost(url, content, authCode) return sendRequest(url, content, 'POST', authCode) end |