Skip to content

Latest commit

 

History

History
25 lines (17 loc) · 711 Bytes

README.md

File metadata and controls

25 lines (17 loc) · 711 Bytes

Example showing an HTTP Proxy implemented with BlackSheep

This example shows an HTTP Proxy implementation, proxying requests for another blacksheep back-end.

Run the frst BlackSheep application:

python blacksheep_app/server.py

Run the BlackSheep proxy application:

python blacksheep_proxy/server.py

Open example-2.html in a browser and use its forms to test uploading to the server directly, and to the BlackSheep proxy. The result should be the same.

Note

The example proxy in blacksheep_proxy handles memory in the proper way:

  • it reads input streams as chunks (never whole in memory)
  • it reads response streams from the back-end in chunks (never whole in memory)