NSURLConnection and Amazon Web Services

Thursday, March 11th, 2004 @ 8:21 pm | Programming

Is anybody using NSURLConnection to interract with the Amazon.com Web Services? I’ve got some code that’s supposed to iterate through the pages of a wishlist, but it seems to choke on certain URLs — AWS returns the generic “We encountered an error processing your request. Please retry.” message.

I’m using the REST interface to AWS and I’m making sure to leave at least 1 second between the end of one request and the beginning of the next.

If I grab the URL from the NSURLConnection and paste it into seemingly any other HTTP client, the results of the wishlist are properly downloaded. I’ve attempted this with IE, Safari, and curl.

Normally, I’d chalk this up to some random occurrence, but my code / AWS is choking on the same pages in a given wishlist every time. I’m not really sure how one goes about debugging connections with AWS, so if anybody has any tips they’de like to share, they’d be greatly appreciated.

One Response to “NSURLConnection and Amazon Web Services”

  1. Clyde Deda Says:

    It is possible that you are not setting up the NSURLRequest, just use NSMutableURLRequest to set headers user agents etc. AWS is most likely expecting something in there.