s3.post()

SaltwaterC edited this page Jul 13, 2012 · 6 revisions

About

Low level method for sending POST requests to the S3 REST API.

Reference

s3.post(path, headers, reqBodyHandler, callback)
  • 'path' - the S3 Path.
  • 'headers' - an object containing the HTTP headers you may want to pass to the POST request, such as the x-amz-* metadata headers.
  • 'resBodyHandler' - the Request Body Handler.
  • 'callback' - the callback that is executed when the processing finishes. It has a couple of arguments: error and result.
  • If there's an error, the callback receives the error argument as Error instance.
  • If the error argument is null, then the response argument contains the response data as decided by the reqBodyHandler.

This low level method is in use for the S3 Multipart Upload API. It is the foundation of s3.initUpload() and s3.completeUpload(). It does not implement the POST object functionality since the same functionality is already covered by s3.put().

You may also use it for deleting multiple objects.