Class: Pindo::HttpClient
- Inherits:
-
Object
- Object
- Pindo::HttpClient
- Defined in:
- lib/pindo/client/httpclient.rb
Instance Attribute Summary collapse
-
#baseurl ⇒ Object
Returns the value of attribute baseurl.
-
#request_config ⇒ Object
Returns the value of attribute request_config.
-
#token ⇒ Object
Returns the value of attribute token.
-
#use_local_wechat_url ⇒ Object
Returns the value of attribute use_local_wechat_url.
Class Method Summary collapse
Instance Attribute Details
#baseurl ⇒ Object
Returns the value of attribute baseurl.
15 16 17 |
# File 'lib/pindo/client/httpclient.rb', line 15 def baseurl @baseurl end |
#request_config ⇒ Object
Returns the value of attribute request_config.
16 17 18 |
# File 'lib/pindo/client/httpclient.rb', line 16 def request_config @request_config end |
#token ⇒ Object
Returns the value of attribute token.
14 15 16 |
# File 'lib/pindo/client/httpclient.rb', line 14 def token @token end |
#use_local_wechat_url ⇒ Object
Returns the value of attribute use_local_wechat_url.
13 14 15 |
# File 'lib/pindo/client/httpclient.rb', line 13 def use_local_wechat_url @use_local_wechat_url end |
Class Method Details
.create_instance ⇒ Object
32 33 34 35 36 |
# File 'lib/pindo/client/httpclient.rb', line 32 def self.create_instance() con = Faraday.new con end |
.create_instance_with_proxy ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/pindo/client/httpclient.rb', line 18 def self.create_instance_with_proxy() # puts body_params.to_json = { uri: ENV['http_proxy'] || ENV['https_proxy'], user: ENV['HTTP_PROXY_USER'], password: ENV['HTTP_PROXY_PASSWORD'] } con = Faraday.new con.proxy = .compact if [:uri] con end |