Class: MyTargetApi::NetClient
- Inherits:
-
Object
- Object
- MyTargetApi::NetClient
show all
- Defined in:
- lib/my_target_api/net_client.rb
Overview
Defined Under Namespace
Classes: Exception, Response
Class Method Summary
collapse
Class Method Details
.delete(*args) ⇒ Object
50
51
52
53
54
|
# File 'lib/my_target_api/net_client.rb', line 50
def delete(*args)
RestClient.delete(*args) { |response, &block| process_response(response, &block) }
rescue RestClient::Exception => e
raise(Exception.new(e, e.message).tap { e.set_backtrace(caller) })
end
|
.get(*args) ⇒ Object
38
39
40
41
42
|
# File 'lib/my_target_api/net_client.rb', line 38
def get(*args)
RestClient.get(*args) { |response, &block| process_response(response, &block) }
rescue RestClient::Exception => e
raise(Exception.new(e, e.message).tap { e.set_backtrace(caller) })
end
|
.post(*args) ⇒ Object
44
45
46
47
48
|
# File 'lib/my_target_api/net_client.rb', line 44
def post(*args)
RestClient.post(*args) { |response, &block| process_response(response, &block) }
rescue RestClient::Exception => e
raise(Exception.new(e, e.message).tap { e.set_backtrace(caller) })
end
|