Class: ThreeScale::Client::HTTPClient::BaseClient
- Inherits:
-
Object
- Object
- ThreeScale::Client::HTTPClient::BaseClient
show all
- Defined in:
- lib/3scale/client/http_client.rb
Class Method Summary
collapse
Instance Method Summary
collapse
Constructor Details
Returns a new instance of BaseClient.
36
37
38
|
# File 'lib/3scale/client/http_client.rb', line 36
def initialize(host)
@host = host
end
|
Class Method Details
.available? ⇒ Boolean
30
31
|
# File 'lib/3scale/client/http_client.rb', line 30
def self.available?
end
|
.prepare ⇒ Object
33
34
|
# File 'lib/3scale/client/http_client.rb', line 33
def self.prepare
end
|
Instance Method Details
#get_request(path) ⇒ Object
40
41
42
43
44
45
|
# File 'lib/3scale/client/http_client.rb', line 40
def get_request(path)
get = Net::HTTP::Get.new(path)
get.add_field(*)
get.add_field('Host', @host)
get
end
|
#post_request(path, payload) ⇒ Object
47
48
49
50
51
52
53
|
# File 'lib/3scale/client/http_client.rb', line 47
def post_request(path, payload)
post = Net::HTTP::Post.new(path)
post.add_field(*)
post.add_field('Host', @host)
post.set_form_data(payload)
post
end
|