How to Use Python to Send a Multipart PDF Request to OneNote
问题 I'm trying to upload a PDF to OneNote using Python. According to the OneNote API, I need to post a request like this: Content-Type:multipart/form-data; boundary=MyAppPartBoundary Authorization:bearer tokenString --MyAppPartBoundary Content-Disposition:form-data; name="Presentation" Content-type:text/html <!DOCTYPE html> <html> <head> <title>A page with an embedded and displayed PDF file</title> </head> <body> <p>Attached is the lease agreement for the expanded offices!</p> <object data