File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ class API(object):
2727 # defaults for the API class
2828 _timeout = 25 # second
2929 _endpoint = "https://overpass-api.de/api/interpreter"
30+ _headers = {"Accept-Charset" : "utf-8;q=0.7,*;q=0.7" }
3031 _debug = False
3132 _proxies = None
3233
@@ -35,6 +36,7 @@ class API(object):
3536
3637 def __init__ (self , * args , ** kwargs ):
3738 self .endpoint = kwargs .get ("endpoint" , self ._endpoint )
39+ self .headers = kwargs .get ("headers" , self ._headers )
3840 self .timeout = kwargs .get ("timeout" , self ._timeout )
3941 self .debug = kwargs .get ("debug" , self ._debug )
4042 self .proxies = kwargs .get ("proxies" , self ._proxies )
@@ -141,7 +143,7 @@ def _get_from_overpass(self, query):
141143 data = payload ,
142144 timeout = self .timeout ,
143145 proxies = self .proxies ,
144- headers = { "Accept-Charset" : "utf-8;q=0.7,*;q=0.7" } ,
146+ headers = self . headers ,
145147 )
146148
147149 except requests .exceptions .Timeout :
You can’t perform that action at this time.
0 commit comments