Sha256: 705d7e8956b6d93b4f830300acba6d187876f6fd684d4f81a28e36d0c6976b91
Contents?: true
Size: 715 Bytes
Versions: 18
Compression:
Stored size: 715 Bytes
Contents
module Script module Layers module Infrastructure class ScriptUploader def initialize(script_service) @script_service = script_service end def upload(script_content) @script_service.generate_module_upload_url.tap do |url| url = URI(url) https = Net::HTTP.new(url.host, url.port) https.use_ssl = true request = Net::HTTP::Put.new(url) request["Content-Type"] = "application/wasm" request.body = script_content response = https.request(request) raise Errors::ScriptUploadError unless response.code == "200" end end end end end end
Version data entries
18 entries across 18 versions & 1 rubygems