Skip to content

Commit

Permalink
add log
Browse files Browse the repository at this point in the history
  • Loading branch information
Tobeyw committed Dec 19, 2023
1 parent 3991e97 commit efa0278
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion neo3fura_http/biz/api/src.GetInfoByNFT.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package api

import (
"encoding/json"
"fmt"
"go.mongodb.org/mongo-driver/bson"
"go.mongodb.org/mongo-driver/bson/primitive"
"io/ioutil"
Expand Down Expand Up @@ -245,14 +246,15 @@ func GetNNSByAddress(address string) (string, string, error) {
} else if rt == "test" {
url = "https://megaoasis.ngd.network:8889/profile/get?address=" //test
}

fmt.Println(url)
resp, err := http.Get(url + address)
if err != nil {
return "", "", err
}
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
var nns, userName string
fmt.Println("body:", string(body))
if string(body) != "" && string(body) != "null" {
var data map[string]interface{}
err = json.Unmarshal(body, &data)
Expand Down

0 comments on commit efa0278

Please sign in to comment.