Archit Bhise wrote in post #1041310:
> I'm trying to also do it via Javascript - but I'd rather not - since
> it leaves my client secret exposed. Also, I don't recieve data back
> either.
>
> ...
> ...
> $.ajaxSetup({
> 'beforeSend': function(xhr){
> xhr.setRequestHeader("Accept", "text/javascript")
> }
> });
Here's an decent explanation of why you JavaScript solution will not
work:
http://www.jquery-tutorial.net/ajax/same-origin-policy/
The same origin policy will prevent your did sending a request directly
to another domain. Look into JSONP for a workaround to the same origin
policy.
You should, however, be able to send the request from the server side
using Ruby.
See open-uri for more details. Here's one example that I found via
Google:
http://juretta.com/log/2006/08/13/ruby_net_http_and_open-uri/
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.