I am having a problem using Indy HTTP (in Delphi) with the Google Contacts API.
Please refer to the section "ClientLogin Response" on the following page:
http://code.google.com/apis/accounts/docs/AuthForInstalledApps.html
The server returns a 403 when the authentication is incorrect or an error occurs... as expected. However, according to this document, there is information in the response content that is needed by the client, e.g. the error reason, and captcha URL, etc.
The problem is that the Indy IdHTTP component throws an exception on a 403 and the response content is empty. I have found no way so far to get to this content. I've tried wrapping the call to Post in a try...except then reading the response stream, but it always empty on a 403.
How would I go about doing this?