Skip to content

Instantly share code, notes, and snippets.

@harlanhaskins
Created March 13, 2015 05:05
Show Gist options
  • Save harlanhaskins/8229fd9c8d8435c28952 to your computer and use it in GitHub Desktop.
Save harlanhaskins/8229fd9c8d8435c28952 to your computer and use it in GitHub Desktop.
@app.route("/<username>", methods=["GET"])
def vcard(username):
vcard = create_vcard_from_username(username)
if not vcard:
return Response("Whoops. Sorry, br0.", status=500)
return Response(vcard, headers={"Content-Type":"text/vcard"})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment