lib/base.rb in overpass-api-ruby-0.2.2 vs lib/base.rb in overpass-api-ruby-0.2.3

- old
+ new

@@ -2,11 +2,11 @@ require 'open-uri' require 'json' module OverpassAPI class Base - DEFAULT_ENDPOINT='http://overpass-api.de/api/interpreter?data=' + DEFAULT_ENDPOINT='http://overpass-api.de/api/interpreter' def initialize(args={}) bbox = args[:bbox] bounding_box(bbox[:s],bbox[:n],bbox[:w],bbox[:e]) if bbox @@ -27,10 +27,10 @@ end private def perform(q) - url = URI::encode("#{@endpoint}#{q}") + url = URI::encode("#{@endpoint}?data=#{q}") r = HTTPI::Request.new(url) JSON.parse(HTTPI.get(r).body, symbolize_names: true) end end end