1. update readme

2. cleanup unused code
This commit is contained in:
kingzcheung 2023-06-21 11:31:40 +08:00
parent 4462cee6c1
commit 1d98890964
4 changed files with 12 additions and 4 deletions

View File

@ -2,7 +2,7 @@
name = "huaweicloud-sdk-rust-obs"
description = "huaweicloud obs rust sdk"
authors = ["KingzCheung <kingzcheung@gmail.com>"]
version = "0.2.0"
version = "0.2.1"
edition = "2021"
readme = "README.md"
license-file = "LICENSE-APACHE-2.0"

View File

@ -36,3 +36,14 @@ async fn main() -> Result<(), ObsError> {
}
```
## 测试
1. 在项目根目录添加 `.env`文件,内容格式如下:
```
OBS_AK=XXXXXXXXXXXXXXX
OBS_SK=XXXXXXXXXXXXXXXXXXXX
```
2. `tests/common/mod.rs` 下的 `DEFAULT_BUCKET_NAME` 替换为自己的 bucket 名称
3. 运行 `cargo test`

View File

@ -1,6 +1,5 @@
use reqwest::{StatusCode};
use serde::Deserialize;
use serde_json::error;
use thiserror::Error;
use crate::model::ErrorResponse;

View File

@ -121,8 +121,6 @@ impl ObjectTrait for Client {
.await?;
let status = resp.status();
let headers = resp.headers().clone();
let text = resp.text().await;
dbg!(text);
if status.is_success() {
let next_position = if let Some(next) = headers.get("x-obs-next-append-position")
{