feat(services/b2): Add operation in http context#6066
Conversation
|
Should we add opendal/core/src/services/b2/core.rs Line 92 in ed809be |
No, let's just ignore those utils API calls. |
| StatusCode::OK => { | ||
| let bs = resp.into_body(); | ||
| let mut resp: ListFileNamesResponse = | ||
| serde_json::from_reader(bs.reader()).map_err(new_json_deserialize_error)?; |
There was a problem hiding this comment.
While doing this refactor I realized that, In my opinion, we should do response deserialization in all core.rs modules. For example, list_file_names should return a ListFileNamesResponse instead of Buffer and then deserialize it in the backend.
I think all methods in core.rs (not only this services, but others) should do something similar to what I'm doing here, since I don't really think it is the backend responsibility.
|
Hi @Xuanwo I refactored what you said in #6066 (comment). What do you think about the changes? |
|
Do not review this yet, I did a mess with the git history and I mistakenly committed some yandex_disk service changes |
|
Fixed! |
Xuanwo
left a comment
There was a problem hiding this comment.
Thank you for working on this!
Relates to #5774