class Awscr::S3::Http
- Awscr::S3::Http
- Reference
- Object
Defined in:
awscr-s3/http.crConstructors
Instance Method Summary
-
#delete(path, headers : Hash(String, String) = Hash(String, String).new)
Issue a DELETE request to the path with optional headers
-
#get(path, headers : Hash(String, String) = Hash(String, String).new)
Issue a GET request to the path
-
#get(path, headers : Hash(String, String) = Hash(String, String).new, &)
Issue a GET request to the path
-
#head(path)
Issue a HEAD request to the path
-
#post(path, body = nil, headers : Hash(String, String) = Hash(String, String).new)
Issue a POST request to the path with optional headers, and body
-
#put(path : String, body : IO | String, headers : Hash(String, String) = Hash(String, String).new)
Issue a PUT request to the path with optional headers and body
Constructor Detail
def self.new(signer : Awscr::Signer::Signers::Interface, region : String = standard_us_region, custom_endpoint : String | Nil = nil)
#
Instance Method Detail
Issue a DELETE request to the path with optional headers
http = Http.new(signer)
http.delete("/")
Issue a GET request to the path
http = Http.new(signer)
http.get("/")
Issue a GET request to the path
http = Http.new(signer)
http.get("/") do |resp|
pp resp
end
Issue a POST request to the path with optional headers, and body
http = Http.new(signer)
http.post("/", body: IO::Memory.new("test"))
def put(path : String, body : IO | String, headers : Hash(String, String) = Hash(String, String).new)
#
Issue a PUT request to the path with optional headers and body
http = Http.new(signer)
http.put("/", body: IO::Memory.new("test"))