mirror of
https://github.com/wahyd4/ruby-sdk.git
synced 2026-08-19 09:49:22 +10:00
24 lines
501 B
Ruby
Executable File
24 lines
501 B
Ruby
Executable File
# -*- encoding: utf-8 -*-
|
|
|
|
require 'qiniu/exceptions'
|
|
|
|
module Qiniu
|
|
module Auth
|
|
|
|
class << self
|
|
|
|
include Utils
|
|
|
|
def call_with_signature(url, data, retry_times = 0, options = {})
|
|
http_request url, data, options.merge({:qbox_signature_token => generate_qbox_signature(url, data)})
|
|
end
|
|
|
|
def request(url, data = nil, options = {})
|
|
Auth.call_with_signature(url, data, 0, options)
|
|
end
|
|
|
|
end
|
|
|
|
end # module Auth
|
|
end # module Qiniu
|