Skip to content

Instantly share code, notes, and snippets.

@harlanhaskins
Created March 13, 2015 05:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • 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