parent
4462cee6c1
commit
1d98890964
|
@ -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"
|
||||
|
|
11
README.md
11
README.md
|
@ -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`
|
|
@ -1,6 +1,5 @@
|
|||
use reqwest::{StatusCode};
|
||||
use serde::Deserialize;
|
||||
use serde_json::error;
|
||||
use thiserror::Error;
|
||||
|
||||
use crate::model::ErrorResponse;
|
||||
|
|
|
@ -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")
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue