![](https://en.delphipraxis.net/uploads/set_resources_2/84c1e40ea0e759e3f1505eb1788ddf3c_pattern.png)
![](https://en.delphipraxis.net/uploads/monthly_2018_10/M_member_280.png)
Mocte Sandoval
Members-
Content Count
12 -
Joined
-
Last visited
Community Reputation
0 Neutral-
Hi @omnibrain I have used Sergio's esegece components in the past I can only say good things about them, the main usage for us was messaging between the core of our software and mobile devices, the software is still running as of today but we are moving our projects from delphi to other technologies. Just to add to the conversation when we did that MQTT project we tried with mosquitto and for us it was never reliable, I can't recall the exact details, but we ended using https://vernemq.com/ it is not available for windows but our server is Linux so no problem, also you can use the open source version without incurring licensing costs as long as you make the build yourself instead of using the prebuilt binaries availables for download, and It's been rock solid to this day . Good luck with your project Regards Mocte
-
https://github.com/Dennis1000/verysimplexml
-
Indy https server - OAUTH2 implementation?
Mocte Sandoval replied to Lars Fosdal's topic in Network, Cloud and Web
May be https://www.esegece.com/delphi/oauth2 Could be of some use for you? -
httpclient POSTing binary data with TIdHTTP
Mocte Sandoval replied to Mocte Sandoval's topic in Indy
Good to know, I'll give it a try tomorrow, thank you Remy -
httpclient POSTing binary data with TIdHTTP
Mocte Sandoval replied to Mocte Sandoval's topic in Indy
Ok, I got rid of all initial "-" so boundary is now e.g. boundary=4024b236a3a1 on header, --4024b236a3a1 in body, and closing --4024b236a3a1-- And all is working great now ! Thank you so much Attila this was driving me nuts. Edit: How can I mark this topic as resolved? -
httpclient POSTing binary data with TIdHTTP
Mocte Sandoval replied to Mocte Sandoval's topic in Indy
Thank you Attila, I stripped that in my search of the correct way, added again with no luck. I'm attaching a sample of what the log looks like, I deleted a great part of its contents because the documents are confidential data but maybe some expert eyes can notice something I'm missing. BTW I think I missed the last line on the log {"error":"multipart: NextPart: EOF"} definitely there is something missing there. test.txt -
httpclient POSTing binary data with TIdHTTP
Mocte Sandoval replied to Mocte Sandoval's topic in Indy
Just tested with the same result (400), I didn't show it here but I have a TIdLogFile for logging the message, the data seems to be all in place, I suspect I am constructing the message in some way different from how TIdMultipartFormDataStream is processed by TidHttp and therefore it is possible I'm not sticking to the http spec for a multipart/form-data post but I'm failing to see where. -
Hi to all I don't ask here often but now I need some help with Indy ( which I don't use often either btw ). The scenario: I need to upload "documents" ( mostly PDF, Tiff, Jpg ) usually from a file to a third party HTTP server, I am doing that perfectly fine with code like this ( just a snippet ) : var Params: TIdMultipartFormDataStream; Begin ... Params.AddFile(fileName, fullFilePath, 'application/octet-stream'); http.Post('http://x.x.x.x:8996/service', Params, responseStream); ... End The endpoint from the server side receives the file and answers with code 201 which is expected. Now the problem, there are a lot of these "documents" stored on files on disk, each of these files contain a bunch of "documents" on a propietary format, which I'm succesfully extracting as an array of bytes, I can save them as individual files with TFileStream and view them with external tools, but I need to send these individual files to the http server, so for speeding up the process I want to avoid saving them to disk, so what i would like is to send the array of bytes straight to the server, here is an snippet from the code I am using so far: procedure SendFromBytes( const buffer: array of byte ); var ... data, idBoundary: String; ... Begin ... idBoundary := '---someboundaryId'; StreamResp := TStringStream.Create('',TEncoding.UTF8); streamSrc := TMemoryStream.create; http.Request.ContentType := sContentTypeFormData + idBoundary; data := idBoundary + CRLF + 'Content-Disposition: form-data; name="'+name+'"' + CRLF + CRLF; streamSrc.Write(data[1], Length(data)); streamSrc.WriteBuffer(Buffer[0], length(Buffer)); data := CRLF + idBoundary; streamSrc.Write(data[1], Length(data)); http.Post('http://x.x.x.x:8996/service', StreamSrc, streamResp); ... End; But here I'm getting 400 Bad request, so I'm not sending the message as is expected by the server Is there an Indy guru here who can help me find the cause? Edit: I'm on Delphi XE3 Edit 2: spelling on subject
-
Do you design each form for separate case, or use common forms for similar design?
Mocte Sandoval replied to Mike Torrettinni's topic in VCL
Cool ! Thank you -
Do you design each form for separate case, or use common forms for similar design?
Mocte Sandoval replied to Mike Torrettinni's topic in VCL
Hi David, I just stumbled across this thread and saw your video, I remember seeing it sometime ago, at the end there is this link: http://goo.gl/8GRLDk but isn't available anymore, would you mind to share again the code of this sample or any other similar you have available? I would like to play around with it if you don't mind. Thank you.