Invoke HTTP request

Hi Folks,

I suspect this will be a 1-liner from someone, as it seems like it
should be really easy but I’ve not worked it out yet.

I am just looking to invoke a GET request to a remote HTTP resource
(php script) from my rails3 app, with some URL parameters. I’m not
bothered about the response, essentially I am looking to trigger a PHP
method through this.

Whats the best way to proceed with this kind of requirement?

Muchos thanks guys

Paul

Paul T. wrote in post #1007085:

Hi Folks,

I suspect this will be a 1-liner from someone, as it seems like it
should be really easy but I’ve not worked it out yet.

I am just looking to invoke a GET request to a remote HTTP resource
(php script) from my rails3 app, with some URL parameters. I’m not
bothered about the response, essentially I am looking to trigger a PHP
method through this.

Whats the best way to proceed with this kind of requirement?

http://stdlib.rubyonrails.org/libdoc/open-uri/rdoc/index.html

Hi folks,

Can I take it that this is harder than it sounds? Would have thought
it should be dead simple but not sure.

Thanks,

Paul

On 24 June 2011 16:09, paulo [email protected] wrote:

On Jun 23, 2:29pm, paulo [email protected] wrote:

I am just looking to invoke a GET request to a remoteHTTPresource
(php script) from my rails3 app, with some URL parameters. I’m not
bothered about the response, essentially I am looking to trigger a PHP
method through this.

Can I take it that this is harder than it sounds? Would have thought
it should be dead simple but not sure.

Nope, on the contrary, you’re right, it’s very starightforward.
Googling “ruby http request” got me the API:

http://ruby-doc.org/stdlib/libdoc/net/http/rdoc/classes/Net/HTTP.html