Class: Bkblz::V1::Request
- Inherits:
-
Object
- Object
- Bkblz::V1::Request
show all
- Defined in:
- lib/bkblz/v1/request.rb
Direct Known Subclasses
AuthorizeAccountRequest, CreateBucketRequest, DeleteBucketRequest, DeleteFileVersionRequest, DownloadFileByIdRequest, DownloadFileByNameRequest, FinishLargeFileRequest, GetFileInfoRequest, GetUploadPartUrlRequest, GetUploadUrlRequest, ListBucketsRequest, ListFileNamesRequest, ListFileVersionsRequest, StartLargeFileRequest, UploadFileRequest, UploadPartRequest
Class Method Summary
collapse
Instance Method Summary
collapse
Class Method Details
.response_class(klass = nil) ⇒ Object
29
30
31
32
|
# File 'lib/bkblz/v1/request.rb', line 29
def response_class(klass=nil)
@response_class = klass unless klass.nil?
@response_class
end
|
.url_suffix(suffix = nil) ⇒ Object
34
35
36
37
|
# File 'lib/bkblz/v1/request.rb', line 34
def url_suffix(suffix=nil)
@url_suffix = suffix unless suffix.nil?
@url_suffix
end
|
Instance Method Details
#send(session) ⇒ Object
40
41
42
43
44
45
46
47
48
|
# File 'lib/bkblz/v1/request.rb', line 40
def send(session)
request = build_request session
Bkblz.log.debug { "sending request => #{request} to URI => #{request.uri}" }
http = Net::HTTP.new(request.uri.host, request.uri.port)
http.use_ssl = true
http.set_debug_output(STDERR) if session.config.debug_http
build_response fetch(http, request)
end
|