rorodata / firefly

function as a service
http://rorodata.github.io/firefly
Apache License 2.0
194 stars 30 forks source link

Support bytes as return type #60

Open anandology opened 7 years ago

anandology commented 7 years ago

Add support for functions returning bytes.

It should be possible to run the following function using firefly.

def random_bytes():
    return b'hello'

It should set the appropriate Content-Type. I think the suitable content-type is application/octet-stream, but it is already used for sending files. I think the file type should pick something other content-type.

droidlife commented 6 years ago

I think the file type should depend on the extension of the file. If the file extension doesn't exist then we might use application/octet-stream.