请求内容:
query格式:
query UnitList($Ids: String!, $offset: Int! ){UnitList(searchParams: {Ids: $Ids, offset: $offset}, searchType: BASE) {list { score score_addbusinesstravel UnitTags commentScore } isOver count}}
data数据:
{"Ids":"123","offset":0}
get/post发送http请求:
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "http://**************/graphql/"
method := "POST" / "GET"
payload := strings.NewReader("{\"query\":\"query UnitList($Ids: String!, $offset: Int!,){UnitList(searchParams: {Ids: $Ids, offset: $offset}, searchType: BASE) {list { score score_addbusinesstravel UnitTags commentScore } isOver count}}\",\"variables\":{\"luIds\":\"123\",\"off