Handbook
Glossary
create-bucket ( bucket -- )
Amazon S3
Prev:
buckets ( -- seq )
Next:
delete-bucket ( bucket -- )
Vocabulary
s3
Inputs
bucket
a
string
Outputs
None
Word description
Creates a bucket with the given name.
Examples
USING: s3 ; "testbucket" create-bucket
Definition
USING:
accessors
http
http.client
kernel
s3.private
;
IN:
s3
:
create-bucket
( bucket -- )
""
swap
"/"
H{
}
clone
"PUT"
<s3-request>
"application/octet-stream"
>>mime-type
dup
s3-url
swapd
<put-request>
0
"content-length"
set-header
sign-http-request
http-request
2drop
;