pub async fn put_object<S: AsRef<str>>(
        &self,
        path: S,
        content: &[u8],
    ) -> Result<(Vec<u8>, u16)> {
        self.put_object_with_content_type(path, content, "application/octet-stream")
            .await
    }
/// Put into an S3 bucket, async.
///
/// # Example
///
/// ```rust,no_run
/// use s3::bucket::Bucket;
/// use s3::creds::Credentials;
/// use s3::S3Error;
///
/// #[tokio::main]
/// async fn main() -> Result<(), S3Error> {
///
///     let bucket_name = &"rust-s3-test";
///     let aws_access = &"access_key";
///     let aws_secret = &"secret_key";
///
///     let bucket_name = &"rust-s3-test";
///     let region = "us-east-1".parse().unwrap();
///     let credentials = Credentials::default().unwrap();
///     let bucket = Bucket::new(bucket_name, region, credentials).unwrap();
///
///     let content = "I want to go to S3".as_bytes();
///     let (_, code) = bucket.put_object("/test.file", content).await?;
///     assert_eq!(201, code);
///     Ok(())
/// }
/// ```
Put into an S3 bucket, async.
Put into an S3 bucket async .
pub async fn put_object<S: AsRef<str>>(
        &self,
        path: S,
        content: &[u8],
    ) -> Result<(Vec<u8>, u16)> {
        self.put_object_with_content_type(path, content, "application/octet-stream")
            .await
    }
pub async fn put_object < S : AsRef < str > > ( & self , path : S , content : & [ u8 ] , ) -> Result < ( Vec < u8 > , u16 ) > { self . put_object_with_content_type ( path , content , " " ) . await }
Put into an S3 bucket, async.
Put into an S3 bucket async .
&self
path
S
content
&[u8]
&self
path
S
content
&[u8]
example
```rust,no_run
use s3::bucket::Bucket;
use s3::creds::Credentials;
use s3::S3Error.
` ` ` rust no_run use s3 :: bucket :: Bucket ; use s3 :: creds :: Credentials ; use s3 :: S3Error .
[tokio::main]
async fn main() -> Result<(), S3Error> {



let bucket_name = &"rust-s3-test";
let region = "us-east-1".parse().unwrap();
let credentials = Credentials::default().unwrap();
let bucket = Bucket::new(bucket_name, region, credentials).unwrap().

let content = "I want to go to S3".as_bytes();
let (_, code) = bucket.put_object("/test.file", content).await?;
assert_eq!(201, code);
Ok(())
}
```
async fn main () - > Result< () S3Error > { let bucket_name = & " rust - s3 - test " ; let region = " us - east - 1 " . parse () . unwrap () ; let credentials = Credentials :: default () . unwrap () ; let bucket = Bucket :: new ( bucket_name region credentials ) . unwrap () . let content = " I want to go to S3 " . as_bytes () ; let ( _ code ) = bucket . put_object ( " / test . file " content ) . await? ; assert_eq! ( 201 code ) ; Ok (( )) } ` ` `