Skip to content
Snippets Groups Projects
Commit 8b52f445 authored by Alex Reisner's avatar Alex Reisner
Browse files

Add code to fetch raw server response.

parent 6df97fa6
No related branches found
No related tags found
No related merge requests found
...@@ -980,12 +980,16 @@ A lot of debugging time can be saved by understanding how Geocoder works with Ac ...@@ -980,12 +980,16 @@ A lot of debugging time can be saved by understanding how Geocoder works with Ac
### Unexpected Responses from Geocoding Services ### Unexpected Responses from Geocoding Services
Take a look at the server's raw JSON response. You can do this by getting the request URL in an app console: Take a look at the server's raw response. You can do this by getting the request URL in an app console:
Geocoder::Lookup.get(:google).query_url(Geocoder::Query.new("...")) Geocoder::Lookup.get(:google).query_url(Geocoder::Query.new("..."))
Replace `:google` with the lookup you are using and replace `...` with the address you are trying to geocode. Then visit the returned URL in your web browser. Often the API will return an error message that helps you resolve the problem. If, after reading the raw response, you believe there is a problem with Geocoder, please post an issue and include both the URL and raw response body. Replace `:google` with the lookup you are using and replace `...` with the address you are trying to geocode. Then visit the returned URL in your web browser. Often the API will return an error message that helps you resolve the problem. If, after reading the raw response, you believe there is a problem with Geocoder, please post an issue and include both the URL and raw response body.
You can also fetch the response in the console:
Geocoder::Lookup.get(:google).send(:fetch_raw_data, Geocoder::Query.new("..."))
Reporting Issues Reporting Issues
---------------- ----------------
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment