Board index » cppbuilder » TNMHTTP *HTTP->Get result save in a text file

TNMHTTP *HTTP->Get result save in a text file


2004-01-29 08:20:33 PM
cppbuilder51
Hi,
how can i save the result from TNMHTTP *HTTP->Get, see below, in a text file
Sample:
TNMHTTP *HTTP;
url = "http://www.........";
HTTP->Get(url);
....
....
Thanks
Juergen
 
 

Re:TNMHTTP *HTTP->Get result save in a text file

Juergen Langer wrote:
Quote
how can i save the result from TNMHTTP *HTTP->Get, see below, in a text file

Sample:

TNMHTTP *HTTP;
url = "http://www.........";
NMHTTP1->InputFileMode=false; // this you should have already
Quote
HTTP->Get(url);
And then:
Memo1->Text = HTTP->Body;
Memo1->SaveToFile ( FileName );
But the way to directly save it to file is
AnsiString FileName = ......
NMHTTP1->InputFileMode = true;
NMHTTP1->Body = FileName;
NMHTTP1->Get (WideString( URL ) );
// done.
You can read all this in the help for TNMHTTP too ..
Hans.