0
0 Комментариев

Я использую python 3.5 и библиотеку requests на ОС Windows.

POST host128/DELO/OData.svc/$batch HTTP/1.1
Host: host128
Connection: keep-alive
Accept: multipart/mixed
MaxDataServiceVersion: 3.0
Origin: host128
DataServiceVersion: 1.0
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.109 Safari/537.36
Content-Type: multipart/mixed;boundary=batch_dd7c-561e-0483
Referer: host128/DELO/Pages/OData/UploadFile.aspx?rc_id=122...
Accept-Language: ru-RU,ru;q=0.9,en-US;q=0.8,en;q=0.7
Cookie: EosDelo_SessionID=00vmdl2v4jw21lnyhefked13ya; chSid=00vmdl2v4jw21lnyhefked13ya 21/02 19:01:50; SL_G_WPT_TO=ru; SL_GWPT_Show_Hide_tmp=undefined; SL_wptGlobTipTmp=undefined; BL_D_PROV=Google; previewOpen=false; EosDelo_Stats_LastSession=00vmdl2v4jw21lnyhefked13ya 21/02 19:01:50
Accept-Encoding: gzip, deflate
Content-Length: 1930
 --batch_dd7c-561e-0483
Content-Type: multipart/mixed; boundary=changeset_3b83-5cf8-3bce
 --changeset_3b83-5cf8-3bce
Content-Type: application/http
Content-Transfer-Encoding: binary
 POST DOC_RC(122)/REF_FILE_List HTTP/1.1
Accept: application/atomsvc+xml;q=0.8, application/json;odata=fullmetadata;q=0.7, application/json;q=0.5, */*;q=0.1
DataServiceVersion: 1.0
Content-Type: application/json
MaxDataServiceVersion: 3.0
 {"__metadata":{"type":"Delo.REF_FILE","properties":{"REF_FILE_ACCESS_List":{"type":"Delo.REF_FILE_ACCESS"},"ISN_REF_FILE":{"type":"Edm.Int32"},"ISN_REF_DOC":{"type":"Edm.Int32"},"ORDERNUM":{"type":"Edm.Int32"},"NAME":{"type":"Edm.String"},"FILESIZE":{"type":"Edm.Int32"},"DESCRIPTION":{"type":"Edm.String"},"CATEGORY":{"type":"Edm.String"},"KIND_DOC":{"type":"Edm.Int32"},"SECURLEVEL":{"type":"Edm.Int32"},"LOCK_FLAG":{"type":"Edm.Int32"},"ISN_USER_LOCK":{"type":"Edm.Int32"},"SCAN_NUM":{"type":"Edm.Int32"},"EDS_CNT":{"type":"Edm.Int32"},"DONTDEL_FLAG":{"type":"Edm.Int32"},"ISN_USER_DONTDEL":{"type":"Edm.Int32"},"IS_HIDDEN":{"type":"Edm.Int32"},"APPLY_EDS":{"type":"Edm.Int32"},"SEND_ENABLED":{"type":"Edm.Int32"},"UPD_DATE":{"type":"Edm.DateTime"},"_more_json":{"type":"Edm.String"}}},"ISN_REF_FILE":-19999,"ISN_REF_DOC":122,"ORDERNUM":2,"NAME":"-4392.pdf","FILESIZE":10388,"DESCRIPTION":"79_04651 от 19_04_2018.pdf","CATEGORY":null,"KIND_DOC":3,"SECURLEVEL":1,"LOCK_FLAG":0,"ISN_USER_LOCK":null,"SCAN_NUM":null,"EDS_CNT":0,"DONTDEL_FLAG":0,"ISN_USER_DONTDEL":null,"IS_HIDDEN":0,"APPLY_EDS":1,"SEND_ENABLED":1,"_more_json":null}
--changeset_3b83-5cf8-3bce
Content-Type: application/http
Content-Transfer-Encoding: binary
 POST REF_FILE_SetContents?sf=4392&tf=-19999 HTTP/1.1
Accept: application/atomsvc+xml;q=0.8, application/json;odata=fullmetadata;q=0.7, application/json;q=0.5, */*;q=0.1
MaxDataServiceVersion: 3.0
 --changeset_3b83-5cf8-3bce--
 --batch_dd7c-561e-0483--

Подскажите как сформировать запрос такого типа на python?


Добавить комментарий