Class: DashamailTransactional::HTTP
- Inherits:
-
Object
- Object
- DashamailTransactional::HTTP
- Defined in:
- lib/dashamail/http.rb
Constant Summary collapse
- VERBS =
{ get: Net::HTTP::Get, post: Net::HTTP::Post }.freeze
Instance Method Summary collapse
- #base_headers(options = {}) ⇒ Object
-
#initialize(options = {}) ⇒ HTTP
constructor
A new instance of HTTP.
- #reset_headers ⇒ Object
Constructor Details
Instance Method Details
#base_headers(options = {}) ⇒ Object
22 23 24 25 26 27 |
# File 'lib/dashamail/http.rb', line 22 def base_headers( = {}) @headers = { 'User-Agent' => "DashaMail(Ruby)/#{DashaMail::VERSION}", 'Content-Type' => 'application/json' }.merge!() end |
#reset_headers ⇒ Object
29 30 31 |
# File 'lib/dashamail/http.rb', line 29 def reset_headers @headers = base_headers end |