ADD_ATTACHMENT with XML or json

ADD_ATTACHMENT with XML or json

I would like to add an attachement to a ticket using xml or json but I have not found much info online besides people using C# or python. I tried doing:

but I keep getting the error:
 Error when adding attachmentthe request doesn't contain a multipart/form-data or multipart/mixed stream, content type header is nul

Does anyone have any suggestions?

                  New to ADSelfService Plus?