In OE11.5 is new Net.pl library and it gives to us possibility to make REST call from OE client. But if i try to replace my curl call
curl -X POST -F "file=@picture.png" http://localhost/test/mytest |
with OE call, than it files.
Looks like file content is not moving to server.
To same server I am able to make POST request from OE, but only without ContentType=Multipart/data.
Probably it is my fault, but can anybody show some lights to me?!
copy-lob from file 'document.pdf' to mDocument.
oInputEntity = new Memptr(mDocument).
oRequest = RequestBuilder :Post('http://httpbin.org/post', oInputEntity) :ContentType('multipart/data') :AcceptJson() :Request.
OpenEdge.Net.MultipartEntity is part of OE11.6,
I assume, that Multipart messages is impossible to handle with OE11.5 ?
We have lot of attachment to documents, what we must store as binary files and idea is to store those files to mongodb as gridfs. For that there is REST service called restheart. And for that service, if you store with gridfs structure, everything must have ContentType Multipart/data. This service is actually quite clever and is able to add real ContentType by himself. So, if I want those binaries back, then they are with correct ContentType.