Presently, the response from a function in SkyCloud (i.e. sharing on) is always JSON. Makes images, etc. difficult to handle.
We could:
allow declaration of response handler function that could set content type, etc.
allow declaration of these things as pragmas
Benefit of handler function is that it could do other standardizing operation like wrapping response in standard JSON response. For example, if the programmer wants to always return
a response handler would let the programmer declare that once and functions would just produce the data without all having to call the handler specifically. Internal calls wouldn't see the handler wrapping. Tha tmight be good or bad.
Presently, the response from a function in SkyCloud (i.e. sharing on) is always JSON. Makes images, etc. difficult to handle.
We could:
Benefit of handler function is that it could do other standardizing operation like wrapping response in standard JSON response. For example, if the programmer wants to always return
a response handler would let the programmer declare that once and functions would just produce the data without all having to call the handler specifically. Internal calls wouldn't see the handler wrapping. Tha tmight be good or bad.