mirror of
https://github.com/M66B/FairEmail.git
synced 2025-01-01 12:44:42 +00:00
Added comment
This commit is contained in:
parent
28880d2a57
commit
797985849a
1 changed files with 12 additions and 0 deletions
|
@ -81,6 +81,18 @@ public class IPInfo {
|
|||
Organization organization = new Organization();
|
||||
try {
|
||||
String json = Helper.readStream(connection.getInputStream(), StandardCharsets.UTF_8.name());
|
||||
/* {
|
||||
"ip": "8.8.8.8",
|
||||
"hostname": "dns.google",
|
||||
"city": "Mountain View",
|
||||
"region": "California",
|
||||
"country": "US",
|
||||
"loc": "37.4056,-122.0775",
|
||||
"org": "AS15169 Google LLC",
|
||||
"postal": "94043",
|
||||
"timezone": "America/Los_Angeles"
|
||||
} */
|
||||
|
||||
JSONObject jinfo = new JSONObject(json);
|
||||
organization.name = jinfo.optString("org");
|
||||
organization.country = jinfo.optString("country");
|
||||
|
|
Loading…
Reference in a new issue