Skip to content

Instantly share code, notes, and snippets.

View vytas7's full-sized avatar

Vytautas Liuolia vytas7

View GitHub Profile
@vytas7
vytas7 / multipart.rst
Last active May 10, 2022 11:20
Multipart form handling in Falcon proposal

multipart/form-data handling in Falcon proposal

Design philosophy

Multipart form handling should be performant, straightforward, and leave full control of the parsing process to the user, i.e. no surprising magic such as automatic creation of large files and saving anything there by default (although tools/helpers may exist to assist in that too).

@vytas7
vytas7 / proxy.py
Created April 25, 2019 17:13
Falcon proxying example using a sink (tested with Falcon 2.0.0rc4 and CPython 3.7)
import io
import falcon
import requests
class Proxy(object):
"""Try, for instance ``/examples/forms1.html``."""
UPSTREAM = 'https://www.simplehtmlguide.com'