code_android_festival_way wrote: > So I tried to work close to the API right now. Here is my result: > > http://nopaste.info/f1b5b7ee24.html > > The only thing I don't understand is how to execute the GET method > with my client. Could you help me out if you understand how to achieve > the execution of the GET method? Would be really nice.
Well, that raises a fascinating issue. It would appear that the version of HttpClient on the device is different than the version that is documented on the site. Either that, or the documentation is messed up. The reason I say that is because the HttpClient#executeMethod() method doesn't seem to be listed in the docs. That's what you need, and it works. So, given an HttpClient (client) and GetMethod (method), just call client.executeMethod(method). It will give you the status code like you had in your orignal pasted chunk of code. I have a fully-worked-out HttpClient sample -- hop over to http://commonsware.com/Android/ and click on the "source code" link. There's a Weather project in there that demonstrates HttpClient accessing the US National Weather Service for your current location. It doesn't show HTTP Authentication, so that portion of your needs wouldn't be covered. I seem to recall hearing about others who have created Twitter clients for Android, so there might be other source floating around out there you could use as a reference. -- Mark Murphy (a Commons Guy) http://commonsware.com _The Busy Coder's Guide to Android Development_ Version 1.0 Published! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

