I am trying to query USPS to get shipping rates in my Rails app.
I am currently fighting Net:HTTP and so I thought I’d ask for some help.
USPS only accepts GET requests, no POST… So, I have something along
@response_plain = Net::HTTP.get(USPS_SERVER_URL,
‘data’ is an XML string we generate elsewhere.
All I am getting back is:
getaddrinfo: No address associated with nodename
Which I am guessing is the response from whatever low-level OS call
implements this network call (?)…
Well, if I print out the string that it’s using:
That URL works. It is the test server USPS URL and returns a response in
So, what am I doing wrong? I have been trying variations of this for
hour and I’m ready to punch the wall.