This contains the correct Content-Type header which is needed by the application server that is going to deal with the request.
Then i pass this string to the pub.client:http service.
Now the remote service fails with: “Unable to get boundary for multipart”
When i checked the HTTP Trace, i can see that IS is setting the Content-Type to “application/x-www-form-urlencoded”,
which explains the error message. It looks like pub.client:http does not take care of the mimestring headers and passes the complete mimestring (including headers) as body.
What do i have to do, to get Content-Type: multipart/form-data;
boundary=“----=_Part_125_1965686719.1520957381494”
as a http request header?
thank you for your reply. I found the solution myself.
After pub.mime:createMimeData, pub.mime:addBodyPart and pub.mime:getEnvelopeStream you can easily pass the generated envStream to pub.client:http (data/mimeStream).
IS then takes the header of the stream and appends them to http headers.
I changed my implementation accordingly and it is working fine.
Hello,
I have the same need for my project but I don’t success
can you share your code ?
remarks : whereas in others “languages” like Java or C, we can’t share easily source code of flow service. I don’t see anywhere in w3 some code.
what is the good way to share ?
please check the attachment. There is a steb by step documentation what i did to get it working.
It´s important that you do not operate on the envStream object, that is generated by pb.mime:getEnvelopeStream before passing it to pub.client:http. Otherwise the stream is empty.
Hi Martin, This is too late to ask this, but if you remember, please let me know if passed any input to pub.mime:createMimeData. Because same implementation is not working for me in the pub.mime:getEnvelopeStream step.
client:http was sending application/x-www-form-urlencoded because :
I was using pub.io.streamToString with envStream from getEnvelopeStream for debug before launching client:http