You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opendal.apache.org by "Xuanwo (via GitHub)" <gi...@apache.org> on 2023/03/29 11:53:59 UTC

[GitHub] [incubator-opendal] Xuanwo commented on a diff in pull request #1797: feat(bindings/nodejs): Support PresignedRequest toJSON

Xuanwo commented on code in PR #1797:
URL: https://github.com/apache/incubator-opendal/pull/1797#discussion_r1151819037


##########
bindings/nodejs/index.d.ts:
##########
@@ -130,4 +130,11 @@ export class PresignedRequest {
    * The key of the map is the header name, and the value is the header value.
    */
   headers(): Record<string, string>
+  /**
+   * Returns the JSON serialization result of this request.
+   *
+   * As the PresignedRequest cannot be serialized directly in JavaScript side.
+   * This is useful to pass to client or third party to create a request directly.
+   */
+  toJSON(): string

Review Comment:
   No a good idea to me. Maybe what you want is https://napi.rs/docs/concepts/object?



-- 
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: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org