# File lib/fog/softlayer/requests/storage/get_object_https_url.rb, line 40
        def  create_temp_url(container, object, expires, method, options = {})
          raise ArgumentError, "Insufficient parameters specified." unless (container && object && expires && method)
          raise ArgumentError, "Storage must be instantiated with the :temp_url_key option" if @temp_url_key.nil?

          scheme = options[:scheme] || @scheme

          # POST not allowed
          allowed_methods = %w{GET PUT HEAD}
          unless allowed_methods.include?(method)
            raise ArgumentError.new("Invalid method '#{method}' specified. Valid methods are: #{allowed_methods.join(', ')}")
          end

          expires        = expires.to_i
          object_path_escaped   = "#{@path}/#{Fog::Softlayer.escape(container)}/#{Fog::Softlayer.escape(object,"/")}"
          object_path_unescaped = "#{@path}/#{Fog::Softlayer.escape(container)}/#{object}"
          string_to_sign = "#{method}\n#{expires}\n#{object_path_unescaped}"

          hmac = Fog::HMAC.new('sha1', @temp_url_key)
          sig  = sig_to_hex(hmac.sign(string_to_sign))

          temp_url_options = {
            :scheme => scheme,
            :host => @host,
            :port => @port,
            :path => object_path_escaped,
            :query => URI.encode_www_form(
              :temp_url_sig => sig,
              :temp_url_expires => expires
            )
          }

          URI::Generic.build(temp_url_options).to_s
        end