class Shoutout::RestClient

Public Class Methods

postJson(apikey:,body:,url:) click to toggle source
# Send the request
response = http.request(request)
puts response.body
return response

end

# File lib/shoutout/restclient.rb, line 23
def self.postJson(apikey:,body:,url:)
    response = HTTP.auth("Apikey #{apikey}").post(url, 
                :json => body
            )
          
            return JSON.parse(response.to_s)

end