fabriciocolombo / delphi-rest-client-api

A Delphi REST client API to consume REST services written in any programming language.
Apache License 2.0
380 stars 182 forks source link

No standardized error handling? #10

Closed thomaserlang closed 11 years ago

thomaserlang commented 11 years ago

Is there a reason for no standardized error handling or is it just not implemented yet?

With indy it raises an error. WinHTTP does nothing.

Did I overlook something?

fabriciocolombo commented 11 years ago

Not yet implemented. What do you think best, following the pattern of Indy and throw exception or catch the exceptions and the client handles the return code Http?

thomaserlang commented 11 years ago

I prefer the Indy way, which gives me access to the status code, error message and the data received from the server.

fabriciocolombo commented 11 years ago

I agree with you. I will standardize the error handling by throwing exceptions. Yours improvements are welcome. Send me a pull request.

fabriciocolombo commented 11 years ago

Fixed by commit 59ee5bcbb3d8b7349f6a6cb8f50bae9dbafe89cc issue #11