0

we are trying to pass a file in form data but we are unable to remove the hyphens, Content-Disposition and Content-Type.

----------------------------376203720009485735911622
Content-Disposition: form-data; name=""; filename="Sample.xml"
Content-Type: application/xml

<Root>
<Name> Naruto </Name>
<Occupation> Hokage </Occupation>
</Root>
----------------------------376203720009485735911622--

1
  • I am reading input as a buffer using ReadAsBuffer in gateway script. Commented Dec 2, 2022 at 9:57

1 Answer 1

0

Your file does not contain valid XML. It contains a multipart HTTP payload with one part of type XML, but everything related to the multipart format must be stripped away before you can feed this into an XSLT processor:

  • all lines up to and including the first blank line
  • the last line (starting with hyphens).
Sign up to request clarification or add additional context in comments.

1 Comment

I have been trying to delete those but iam unable to remove those multipart payload, guide me to do so in gatewayscript. Note: those multipart payload is automatically added when i tried to send the sample file(which is an xml file) to the backend server.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.