2024 Dec 09 12:33 PM - edited 2024 Dec 09 1:11 PM
Hello Experts,
im currently implementing a Webservice. I have to transfer a XML string and a seperate XML file via POST request. I'm currently struggeling with the multipart handling for the XML string.
Does anybody have a working code example? I already tried adding multipart data with set_form_field and set_cdata for the XML string.
The HTTP Request should look like this:
POST /documents?template_name=library%2sample.template&document_name=ps_demo08&user_id=TechUser HTTP/1.1
Authorization: Bearer {{bearer_token}}
Ocp-Apim-Subscription-Key: {{apiKey}}
User: Technical User
Password: Technical Password
Content-Type: multipart/form-data; boundary=---011000010111000001101001
Host: host.net
Content-Length: 308
-----011000010111000001101001
Content-Disposition: form-data; name="xml"
<?xml version="1.0" encodiing= "utf-8"?>
-----011000010111000001101001
Content-Disposition: form-data; name="zugferd"
\\share\User\Downloads\sample.xml
-----011000010111000001101001--
Thanks for helping.
Request clarification before answering.
User | Count |
---|---|
53 | |
6 | |
6 | |
5 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.