class Hypernova::Request

Attributes

jobs[R]

Public Class Methods

new(jobs) click to toggle source
# File lib/hypernova/request.rb, line 5
def initialize(jobs)
  @jobs = jobs
end

Public Instance Methods

body() click to toggle source
# File lib/hypernova/request.rb, line 9
def body
  post.body
end

Private Instance Methods

payload() click to toggle source
# File lib/hypernova/request.rb, line 17
def payload
  {
    :body => jobs,
    :idempotent => true,
    :request_format => :json,
    :response_format => :json,
  }
end
post() click to toggle source
# File lib/hypernova/request.rb, line 26
def post
  if Hypernova.configuration.http_client
    Hypernova::HttpClientRequest.post(payload)
  else
    Hypernova::FaradayRequest.post(payload)
  end
end