Ping Access API Method
參數
此方法不接受任何參數
退貨
值
字串
載入中...
請求
1package main23import (4"context"5"log"67"github.com/onflow/flow/protobuf/go/flow/access"8)910func main() {1112// Requires authenticating before making the request. Refer to Intro Page on how Authentication can be done.13client, err := getAccessClientWithBasicAuth("ENDPOINT-NAME", "TOKEN_GOES_HERE")14ctx := context.Background()15if err != nil {16log.Fatalf("err: %v", err)17}18// Ping19res, err := client.Ping(ctx, &access.PingRequest{})20if err != nil {21log.Fatal("ping failed: ", err)22}23println("Ping returned", res)24}
1package main23import (4"context"5"log"67"github.com/onflow/flow/protobuf/go/flow/access"8)910func main() {1112// Requires authenticating before making the request. Refer to Intro Page on how Authentication can be done.13client, err := getAccessClientWithBasicAuth("ENDPOINT-NAME", "TOKEN_GOES_HERE")14ctx := context.Background()15if err != nil {16log.Fatalf("err: %v", err)17}18// Ping19res, err := client.Ping(ctx, &access.PingRequest{})20if err != nil {21log.Fatal("ping failed: ", err)22}23println("Ping returned", res)24}