From: Bea Martin Date: 2007-10-08T00:56:57+09:00 Subject: newbie... be gentle I am trying to access the US Postal Service web tool for tracking. I am new to Ruby and web programming in general so if this is a really stupid question I apologize in advance. According to their site the if I access the test server with: http://testing.shippingapis.com/ShippingAPITest.dll?API=TrackV2&XML= I should get a test response. Sure enough, if I substitute in the correct values for userid, trackid and paste it into my browser I get the correct "test" response. Now to do it in Ruby... I wrote: begin request_body = <<-EOT EOT end @path = '/ShippingAPITest.dll?API=TrackV2?XML=' http_address = 'testing.shippingapis.com' @headers = {'Content-Type' => 'text/xml'} @http = Net::HTTP.new(http_address) headers = @headers headers['Content-Length'] = request_body.length.to_s response = nil @http.start do |http| response = http.request_post(@path, request_body) end puts "Response is: #{response.code} => #{response.header} #{response.body}" and the response I get is: Response is: 501 => # HTTP Error 501

NOT IMPLEMENTED

The server is unable to perform the method API=TrackV2?XML= at this time. I am sure this is something really basic, can anyone help me out? -- Posted via http://www.ruby-forum.com/.