Updated place resolve module to use new HTTP module.
This commit is contained in:
parent
d4c5da2a76
commit
ca7c8f0afd
|
@ -11,8 +11,12 @@ async function resolvePlace(query) {
|
|||
try {
|
||||
// https://operations.osmfoundation.org/policies/nominatim/
|
||||
const res = await http.get(`https://nominatim.openstreetmap.org/search/${encodeURI(query)}?format=json&accept-language=en&addressdetails=1`, {
|
||||
headers: {
|
||||
'User-Agent': 'contact at moonloop.adult@protonmail.com',
|
||||
}, { queueMethod: '1s' });
|
||||
},
|
||||
interval: 1000,
|
||||
concurrency: 1,
|
||||
});
|
||||
|
||||
const [item] = res.body;
|
||||
|
||||
|
|
Loading…
Reference in New Issue