Use class
This commit is contained in:
parent
e21e069c81
commit
7606a4fee2
@ -2,17 +2,20 @@ from typing import Dict, Optional, Tuple
|
||||
|
||||
import multipart
|
||||
|
||||
class Part:
|
||||
headers = []
|
||||
data : bytes
|
||||
|
||||
def get_body_from_form_data(
|
||||
body: bytes, boundary: str
|
||||
) -> Tuple[Optional[bytes], Dict[str, str]]:
|
||||
print("YO BYTES", body)
|
||||
|
||||
current_part = { headers : [], data : "" }
|
||||
current_part = Part()
|
||||
parts = []
|
||||
|
||||
def on_part_begin():
|
||||
current_part = { headers : [], data : "" }
|
||||
current_part = Part()
|
||||
print("YO PART BEGAN")
|
||||
return
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user