[twitter-dev] Re: Anyone updated jmathai OAuth library for 301s?

2009-09-01 Thread jmathai
I didn't know FOLLOWLOCATION didn't work for posts :). Looks like the only way to fix it is to manually follow the url in the header for 301/302s. http://github.com/jmathai/twitter-async/issues/#issue/20 On Aug 31, 8:44 am, davidddn david.dellan...@gmail.com wrote: Has anyone updated the

[twitter-dev] Re: Anyone updated jmathai OAuth library for 301s?

2009-09-01 Thread jmathai
I'm reconsidering adding support for POSTs. What's the usecase exactly? Does Twitter 302 POST requests? If so, what's gained by the application if it follows that? On Aug 31, 8:44 am, davidddn david.dellan...@gmail.com wrote: Has anyone updated the Jaisen Mathai OAuth library to support

[twitter-dev] Re: Anyone updated jmathai OAuth library for 301s?

2009-09-01 Thread davidddn
On Sep 1, 5:00 pm, jmathai jmat...@gmail.com wrote: I'm reconsidering adding support for POSTs.  What's the usecase exactly?  Does Twitter 302 POST requests?  If so, what's gained by the application if it follows that? Unless I am mistaken Twitter is still doing the 302 on POST as a

[twitter-dev] Re: Anyone updated jmathai OAuth library for 301s?

2009-09-01 Thread davidddn
On Sep 1, 6:41 pm, jmathai jmat...@gmail.com wrote: That's a valid point.  What do you think of following on GETs and throwing an exception for POSTs?  Not sure many people like to deal with exceptions (I prefer them). It would be helpful if someone from Twitter or who has done some extensive

[twitter-dev] Re: Anyone updated jmathai OAuth library for 301s?

2009-09-01 Thread fbparis
I've just coded this function which may help : function redirect_post($url,$data) { $ch = curl_init($url); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 2); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, false);

[twitter-dev] Re: Anyone updated jmathai OAuth library for 301s?

2009-09-01 Thread jmathai
One the issues is that the twitter-sync library utilizes multicurl which allows for parallel requests. Introducing this type of logic is tricky since the library allows you to access the results later and only at that point can we inspect the headers. Most people probably use it in a manner