HTTP POST + attachments - Forum - OpenEdge Development - Progress Community

HTTP POST + attachments

This question is answered


I am working in a Procedure to send an HTTP Post request with an attachment included. I am using the MultipartEntity class in order to create a MultiPart HTTP request so I could be compliant with the requirements given.

At some point, I'm trying to do this:

lvc_Filename = "myTestPdf.pdf"

/* File part */
lvo_AttReqPart = new MessagePart('application/pdf', XXXXXX).

lvo_HdrPart = HttpHeaderBuilder:Build('Content-Disposition':u)
                 :Value(substitute('attachment; filename=&1':u, quoter(lvc_Filename)))



So, I'm trying to create a MessagePart Object containing a PDF file, my issue is that I don't really know what should I put in the XXXX in order to successfully transfer my pdf file.

I've tried with a MEMPTR where I've done a COPY-LOB from my file but is not working neither I was sure if that binary structure could be understood by the server side.

Does anyone knows how should I proceed?


Thanks in advance!

Verified Answer
All Replies