755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
|
# File 'spaceship/lib/spaceship/client.rb', line 755
def request(method, url_or_path = nil, params = nil, = {}, auto_paginate = false, &block)
.merge!(csrf_tokens)
.merge!()
['User-Agent'] = USER_AGENT
log_request(method, url_or_path, params, , &block)
if method == :post && params && !block_given?
params, = encode_params(params, )
end
response = if auto_paginate
send_request_auto_paginate(method, url_or_path, params, , &block)
else
send_request(method, url_or_path, params, , &block)
end
return response
end
|