HI All, i am new to ROR i am writing Ruby code for calling API blogs i have written ruby code for creating a attachment xml by require ''net/http'' require ''uri'' url = URI.parse(''https://localhost:3000/api/attachment/create.xml'') req = Net::HTTP::Post.new(url.path) req.basic_auth ''a'', ''a'' res = Net::HTTP.new(url.host, url.port).start {|http| http.request(req)} case res when Net::HTTPSuccess, Net::HTTPRedirection puts res.body else res.error! end Actually this works fine wth http protocol, My site is hosted in https protocol, can https protocol can be used in the below format. if i try to convert this kind of URL i get a error as SocketError: getaddrinfo: Temporary failure in name resolution plz help me in this -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Jan 8, 7:31 am, Sasi <ssasidara...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Actually this works fine wth http protocol, > > My site is hosted in https protocol, can https protocol can be used in > the below format. if i try to convert this kind of URL i get a error > as > > SocketError: getaddrinfo: Temporary failure in name resolution >You need to requrire net/https for https to work although I wouldn''t have thought it would fail like this. Fred> plz help me in this-- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
ya ur right ,... nw it worked.. thanks for ur quick reply :) On Jan 8, 1:57 pm, Frederick Cheung <frederick.che...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Jan 8, 7:31 am, Sasi <ssasidara...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Actually this works fine wth http protocol, > > > My site is hosted in https protocol, can https protocol can be used in > > the below format. if i try to convert this kind of URL i get a error > > as > > > SocketError: getaddrinfo: Temporary failure in name resolution > > You need to requrire net/https for https to work although I wouldn''t > have thought it would fail like this. > > Fred > > > > > plz help me in this- Hide quoted text - > > - Show quoted text --- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.