A usual pattern when writing HTTP handlers in JavaScript is having a function that takes both the request and response, and constructing the response using a builder-like pattern, by chaining the desired status, headers, or body.
This is similar to how other JS frameworks construct HTTP handlers — is this something we'd consider implementing into this SDK?
It is a departure from other Spin SDKs and from the current implementation of this SDK, which takes in the request as a parameter, and returns the response as the result.
A usual pattern when writing HTTP handlers in JavaScript is having a function that takes both the request and response, and constructing the response using a builder-like pattern, by chaining the desired status, headers, or body.
An example using Express:
This is similar to how other JS frameworks construct HTTP handlers — is this something we'd consider implementing into this SDK?
It is a departure from other Spin SDKs and from the current implementation of this SDK, which takes in the request as a parameter, and returns the response as the result.