jsconst headers = new Headers();
const options = {
method: "GET",
headers: headers,
redirect: "follow",
};
headers.append("X-Api-Key", "API_KEY");
fetch("https://naija-places.toneflix.com.ng/api/v1/states", options)
.then((response) => response.json())
.then((result) => console.log(result))
.catch((error) => console.log("error", error));
tsconst headers = new Headers();
const options = {
method: "GET",
headers: headers,
redirect: "follow",
};
headers.append("X-Api-Key", "API_KEY");
fetch("https://naija-places.toneflix.com.ng/api/v1/states/1/cities", options)
.then((response) => response.json())
.then((result) => console.log(result))
.catch((error) => console.log("error", error));
tsconst headers = new Headers();
const options = {
method: "GET",
headers: headers,
redirect: "follow",
};
headers.append("X-Api-Key", "API_KEY");
fetch("https://naija-places.toneflix.com.ng/api/v1/states/1/lgas", options)
.then((response) => response.json())
.then((result) => console.log(result))
.catch((error) => console.log("error", error));
tsconst headers = new Headers();
const options = {
method: "GET",
headers: headers,
redirect: "follow",
};
headers.append("X-Api-Key", "API_KEY");
fetch(
"https://naija-places.toneflix.com.ng/api/v1/states/1/lgas/3/wards",
options
)
.then((response) => response.json())
.then((result) => console.log(result))
.catch((error) => console.log("error", error));
tsconst headers = new Headers();
const options = {
method: "GET",
headers: headers,
redirect: "follow",
};
headers.append("X-Api-Key", "API_KEY");
fetch(
"https://naija-places.toneflix.com.ng/v1/states/1/lgas/3/wards/1/units",
options
)
.then((response) => response.json())
.then((result) => console.log(result))
.catch((error) => console.log("error", error));