We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
/json
1 parent a26ff5c commit 1f03fe2Copy full SHA for 1f03fe2
src/ipinfoWrapper.ts
@@ -157,7 +157,7 @@ export default class IPinfoWrapper {
157
return data;
158
}
159
160
- return this.fetchApi(ip).then(async (response) => {
+ return this.fetchApi(`${ip}/json`).then(async (response) => {
161
const ipinfo = (await response.json()) as IPinfo;
162
163
/* convert country code to full country name */
@@ -237,7 +237,7 @@ export default class IPinfoWrapper {
237
filter: boolean
238
): Promise<any> {
239
return this.fetchApi(`batch${filter ? "?filter=1" : ""}`, {
240
- // Accept: "application/json",
+ Accept: "application/json",
241
headers: {
242
"Content-Type": "application/json"
243
},
0 commit comments