Unless you work at Twitter, this will run afoul of the Single Origin  
Policy, and you can't do this. (Ajax requests have to stick to the  
domain and port that they are run from for their content.) If you  
create a simple proxy and run it on your server, then you could  
request /mytwitterproxy.php from your server with impunity.

Walter

On Aug 5, 2009, at 5:30 PM, 0m4r wrote:

>
> Hi All,
>
> I have a strange behavior with a pice of code I wrote using the latest
> prototype release, here it is:
> ==
> var debug = $('debug');
>       new Ajax.Request("http://twitter.com/statuses/
> public_timeline.json", {
>         method: 'get',
>         onLoading: function(){
>                   debug.update('Loading...');
>                 },
>         onSuccess: function(transport) {
>           debug.update("SUCCESS: " + transport.responseJSON  + "<br/
>> ");
>         },
>         onException: function(transport, exception){
>           debug.update("EXCEPTION: " + exception);
>         }
>       });
> ==
>
> What is happening here is that I'm doing an HTTP OPTION request
> instead of a HTTP GET request and I believe it is because of this:
> http://hacks.mozilla.org/2009/07/cross-site-xmlhttprequest-with-cors/
> but anyway I don't know how to manage/avoid it. I just want to make an
> AJAX request using HTTP GET.
>
> Can anyone help me?
>
> Many thanks,
>
> Omar
>
> >


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to