Javascript Fetch
Javascript Axios
Python Request
Python HTTP Client
SAMPLE RESPONSE
Javascript Fetch
const url="https://api.ipstack.com/72.229.28.185,110.174.165.78?access_key=a9b57e3b51c26e5418baabf34be67947";
const options = {
method: "GET",
};
try {
const response = await fetch(url, options);
const result = await response.text();
console.log(result);
} catch (error) {
console.error(error);
}
import axios from "axios";
const options = {
method: "GET",
url: "https://api.ipstack.com/72.229.28.185,110.174.165.78?access_key=a9b57e3b51c26e5418baabf34be67947",
};
try {
const response = await axios.request(options);
console.log(response.data);
} catch (error) {
console.error(error);
}
import requests
url = "https://api.ipstack.com/72.229.28.185,110.174.165.78?access_key=a9b57e3b51c26e5418baabf34be67947"
response = requests.get(url)
print(response.json())
import http.client
conn = http.client.HTTPSConnection("api.ipstack.com")
conn.request("GET", "/72.229.28.185,110.174.165.78?access_key=a9b57e3b51c26e5418baabf34be67947")
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
SAMPLE RESPONSE