-
Notifications
You must be signed in to change notification settings - Fork 707
feat(services/b2): Add operation in http context #6066
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for working on this!
Relates to #5774