| Conditions | 1 |
| Total Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | require 'json' |
||
| 36 | |||
| 37 | def request |
||
| 38 | @request ||= Net::HTTP::Post.new(uri.path, default_headers).tap do |r| |
||
| 39 | if params.any? |
||
| 40 | r.body = params.to_json |
||
| 41 | end |
||
| 42 | |||
| 43 | if access_token |
||
| 44 | r.add_field('Authorization', "Bearer #{access_token}") |
||
| 45 | end |
||
| 46 | |||
| 47 | if api_version |
||
| 48 | r.add_field('Api-Version', @api_version) |
||
| 49 | end |
||
| 50 | end |
||
| 51 | end |
||
| 78 |