I'm using net/http and json to geocode an address using google's Geocoding API. Here is where the error is being thrown:

response = Net::HTTP.get_response(URI.parse(url))
result = JSON.parse(response)

The response is of class Net::HTTPOK, but I want to access the actual JSON response data (not just the status code).

有帮助吗?

解决方案

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top