Module: DOF::Client
- Defined in:
- lib/DOF/client.rb
Class Method Summary collapse
Class Method Details
.get(path:, body: nil, headers: {}) ⇒ Object
3 4 5 6 7 8 |
# File 'lib/DOF/client.rb', line 3 def self.get(path:, body: nil, headers: {}) response = DOF.connection.get path, body, headers JSON.parse(response.body) rescue Faraday::ConnectionFailed, Faraday::TimeoutError raise DOF::Errors::NetworkError end |