messense commented on code in PR #2950:
URL: 
https://github.com/apache/incubator-opendal/pull/2950#discussion_r1306896625


##########
bindings/python/src/lib.rs:
##########
@@ -368,6 +368,34 @@ impl EntryMode {
     }
 }
 
+#[pyclass(module = "opendal")]
+struct PresignedRequest(od::raw::PresignedRequest);
+
+#[pymethods]
+impl PresignedRequest {
+    /// Return the URL of this request.
+    #[getter]
+    pub fn url(&self) -> String {
+        self.0.uri().to_string()
+    }
+
+    /// Return the HTTP method of this request.
+    #[getter]
+    pub fn method(&self) -> &str {
+        self.0.method().as_str()
+    }
+
+    /// Return the HTTP headers of this request.
+    #[getter]
+    pub fn headers<'p>(&'p self, py: Python<'p>) -> HashMap<&'p str, &'p 
PyBytes> {

Review Comment:
   Convert `HeaderMap` to `HashMap` will only preserve the last value of a 
multi-value header. Will it become a problem?
   
   See https://docs.rs/http/0.2.9/http/header/struct.HeaderMap.html#method.iter



-- 
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