public void CreateBucket(string bucketName) { WebRequest webRequest = this.BuildWebRequest("PUT", bucketName, new HeaderList()); webRequest.ContentLength = 0L; webRequest.GetRequestStream().Close(); S3Response.Execute(webRequest); }
public S3Response put(string bucket, string key, S3Content content, HeaderList headers) { WebRequest webRequest = this.BuildWebRequest("PUT", bucket + "/" + this.EncodeKeyForSignature(key), headers); webRequest.ContentLength = (long)content.Bytes.Length; Stream requestStream = webRequest.GetRequestStream(); requestStream.Write(content.Bytes, 0, content.Bytes.Length); requestStream.Close(); return(S3Response.Execute(webRequest)); }