Skip to content
Snippets Groups Projects
Commit b0cdf1ec authored by Robert May's avatar Robert May
Browse files

Adds sending request header support, useful for Nominatim at the least.

parent f5cbf275
No related branches found
No related tags found
No related merge requests found
...@@ -149,7 +149,7 @@ module Geocoder ...@@ -149,7 +149,7 @@ module Geocoder
unless cache and body = cache[url] unless cache and body = cache[url]
client = http_client.new(uri.host, uri.port) client = http_client.new(uri.host, uri.port)
client.use_ssl = true if Geocoder::Configuration.use_https client.use_ssl = true if Geocoder::Configuration.use_https
response = client.get(uri.request_uri) response = client.get(uri.request_uri, Geocoder::Configuration.request_headers)
body = response.body body = response.body
if cache and (200..399).include?(response.code.to_i) if cache and (200..399).include?(response.code.to_i)
cache[url] = body cache[url] = body
......
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