Class: Hypernova::FaradayRequest

Inherits:
Object
  • Object
show all
Defined in:
lib/hypernova/faraday_request.rb

Class Method Summary collapse

Class Method Details

.post(payload) ⇒ Object



4
5
6
7
8
9
10
# File 'lib/hypernova/faraday_request.rb', line 4

def self.post(payload)
  Hypernova::FaradayConnection.build.post do |request|
    request.url(Hypernova::BatchUrlBuilder.path)
    request.headers["Content-Type"] = "application/json"
    request.body = payload[:body].to_json
  end
end