Allow me to second the recommendation to read up on ActiveResource - this is
exactly what it's designed for, and in fact if you're also developing the
ReST API, you can use ActiveResource to impose convention (over
configuration) in your API - plus you'll have a nice test rig when you're
done.
Onl
Hi,
I never tried this, but it should be something like this:
required_parameters = ["param1=value1", "param2=value2"]
...
self.response_body = proc do |response, output|
net_http.start do |http|
http.get(uri.path + '?' + required_parameters.join('&'))
case res
...
Maybe,
On 1 mar, 19:32, exequiel wrote:
> Hi,
>
> To send data from an action I do this:
>
> def send_mydata
> ...
> uri = URI.parse(link)
> net_http = Net::HTTP.new(uri.host, uri.port)
> net_http.open_timeout = timeout
> net_http.read_timeout = timeout
> net_http.use_ssl = (uri.scheme == '
Hi,
To send data from an action I do this:
def send_mydata
...
uri = URI.parse(link)
net_http = Net::HTTP.new(uri.host, uri.port)
net_http.open_timeout = timeout
net_http.read_timeout = timeout
net_http.use_ssl = (uri.scheme == 'https')# enable SSL/TLS
if net_http.use_ssl?
net_h
On 28 fév, 21:30, Bill Walton wrote:
> I use the Ruby Net::HTTP library to construct requests.
>
> Best regards,
> Bill
>
Thanks to all for your answer.
Bill, can you show me please how you you use the NET::HTTP library to
call web service.
Because i have used the NET::HTTP libray like the fol
On Feb 28, 8:03 am, gs84 wrote:
> I use rest web service in my rails application for user's
> authentication (user creation, login, ...)
> Can someone explain me, how can i call a REST Web service (not
> developped in Rails, and deployed by Tomcat) in my rails application
> via POST method.
You
Define a class like this in your models folder
class MyUserWS < ActiveResource::Base
self.site = "http://localhost/";# point this to the location of
your web service
self.format = :json # default format is xml.
include this line if you want json
self.element_name =
7 matches
Mail list logo