EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Better way to stream from TElHTTPSClient to TStringList?

Also by EldoS: Rethync
The cross-platform framework that simplifies synchronizing data between mobile and desktop applications and servers and cloud storages
Posted: 06/11/2012 17:51:50
by Eric Lenington (Standard support level)
Joined: 12/06/2010
Posts: 37

I'm currently retrieving a name-value "file" via HTTPS. The way I'm going it seems like it could be improved: HTTPS--(via OutputStream)-->TMemoryStream->TStringList. Is there a better way that would eliminate the TMemoryStream? In other words, can I go directly from the HTTPS client component to the TStringList?
Posted: 06/12/2012 01:15:48
by Eugene Mayevski (EldoS Corp.)

Something like this:

HTTPClient.OutputStream := TStringStream.Create;
MyStringList.Text := TStringStream(HTTPClient.OutputStream).Text; // I don't remember exact TStringStream's property name

Sincerely yours
Eugene Mayevski
Posted: 06/12/2012 08:04:23
by Eric Lenington (Standard support level)
Joined: 12/06/2010
Posts: 37

Yes, that's essentially what I'm already doing. I was hoping to eliminate the extra step of the TStringStream, which essentially does nothing more than "double buffer" the content from the GET.



Topic viewed 659 times

Number of guests: 1, registered members: 0, in total hidden: 0


Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!