INNER CODE UNIT · Python
submit_form
witchan/ios-mcp · scripts/submit_bigboss_update.py:131
def submit_form(
action_url: str,
fields: list[tuple[str, str]],
deb_path: Path,
timeout: float,
) -> tuple[int, bytes]:
body, boundary = multipart_body(fields, "cf_uploadfile3[]", deb_path)
request = Request(
action_url,
data=body,
method="POST",
headers={
"User-Agent": "ios-mcp-bigboss-update/1.1",
"Content-Type": f"multipart/form-data; boundary={boundary}",
"Content-Length": str(len(body)),
"Referer": FORM_URL,
},
)