Solved

Prevent Crashing in FPIETTE's HTTP Cli

Posted on 1998-09-01
2
227 Views
Last Modified: 2010-04-04
I have a problem when using he's components..
If i try to GET a file from a url and it does not exist
it crashes, and same with alot of other things..
i tryed with
 Try blabla.
  Except on Eblabla...
Still wont help..
What can i do.. Example please...
 
0
Comment
Question by:brainware
2 Comments
 
LVL 7

Expert Comment

by:BlackMan
ID: 1338401
Have you tried to post it on the support maillist?
0
 
LVL 1

Accepted Solution

by:
EmmDieh earned 50 total points
ID: 1338402
The following works in my Application. I.e. the code catches
the exception and displays a message when the file cannot be
found (StatusCode = 404). Perhaps you have an old version
of the component set. Check for the latest version.

      HttpClient: THttpCli;

    TransferStartTime := TimeGetTime;
    try
      HTTPClient.Get;
      TransferEndTime := TimeGetTime;
    except
      with HTTPClient do
        MemoAdd(Format('  GET Failed ! StatusCode = %d, ReasonPhrase = %s', [StatusCode, ReasonPhrase]));
    end;

0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now