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