Handbook
Glossary
prepare-b2-binary-file ( path encoding -- post-data headers )
Vocabulary
backblaze
Inputs
path
an
object
encoding
an
object
Outputs
post-data
an
object
headers
an
object
Definition
USING:
checksums
checksums.sha
combinators
hex-strings
http.client.post-data
io.files
io.pathnames
kernel
make
;
IN:
backblaze
:
prepare-b2-binary-file
( path encoding -- post-data headers )
[
"b2/x-auto"
"Content-Type"
,,
{
[
drop
file-name
"X-Bz-File-Name"
,,
]
[
drop
sha1
checksum-file
bytes>hex-string
"X-Bz-Content-Sha1"
,,
]
[
file-contents
>post-data
]
}
2cleave
]
H{
}
make
;