wcy-fdu commented on code in PR #2142:
URL: 
https://github.com/apache/incubator-opendal/pull/2142#discussion_r1179192076


##########
core/src/services/gcs/core.rs:
##########
@@ -250,6 +250,48 @@ impl GcsCore {
         self.send(req).await
     }
 
+    pub async fn gcs_delete_objects(
+        &self,
+        paths: Vec<String>,
+    ) -> Result<Response<IncomingAsyncBody>> {
+        let uri = "/batch/storage/v1/".to_string();
+        let mut req = Request::post(&uri);
+        req = req.header(
+            CONTENT_TYPE,
+            "multipart/mixed; 
boundary==\"---opendal-gcs-batch-delete-boundary---\"",
+        );
+
+        let mut batch_req_body = BytesMut::default();
+
+        for path in paths {
+            let p = build_abs_path(&self.root, &path);
+            let mut req_body = BytesMut::default();
+            write!(
+                &mut req_body,
+                "--\"---opendal-gcs-batch-delete-boundary---\"\n
+                Content-Type: application/http\n\n
+                DELETE {}/batch/storage/v1/b/{}/o/{}\n

Review Comment:
   I think inside a batch request is normal delete object request, so I just 
follow the [delete 
url](https://github.com/apache/incubator-opendal/blob/e871a6f0b5db6f8325f2df9a7c4057b781991518/core/src/services/gcs/core.rs#L375-L380).
   
   BTW, I don't have a personal gcp account, so I have not test this request.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to