api_caller
Call APIs safely.
Usage
GET
ApiCaller.get(uri_string: 'www.my_api.com/v1/interesting_stuffs.json', logger: Rails.logger)
POST required arguments
ApiCaller.post(uri_string: 'www.my_api.com/v1/interesting_stuffs', params: '{"key": "value"}')
or with optional arguments
ApiCaller.post(uri_string: 'www.my_api.com/v1/interesting_stuffs', params: '{"key": "value"}', content_type: {'Content-Type' => 'application/json'}, logger: Rails.logger)
DELETE
ApiCaller.delete(uri_string: 'www.my_api.com/v1/resource/to-delete', logger: Rails.logger)
Install
Edit your Gemfile and add:
gem 'api_caller'
License
The gem api_caller is released under the MIT License.
Author
Team Nautilus