Skip to content

Instantly share code, notes, and snippets.

@hackerain
Created December 4, 2013 00:57
Show Gist options
  • Save hackerain/7780531 to your computer and use it in GitHub Desktop.
Save hackerain/7780531 to your computer and use it in GitHub Desktop.
wsme.types.File example
import wsme
from pecan import rest
from wsmeext.pecan import wsexpose
class RootController(rest.RestController):
@wsexpose(wsme.types.File)
def get(self):
f = open('/tmp/test/works/works/templates/index.html', 'r')
return wsme.types.File(filename='index.html',
file=f,
contenttype='text/html')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment