This commit is contained in:
richboo111
2022-08-18 16:13:56 +08:00
parent 52b7662609
commit 75679bf4d1
2 changed files with 2 additions and 2 deletions

View File

@@ -36,7 +36,7 @@ func (a *API) AccessAPI2(url string, params map[string]interface{}) (retVal map[
}
err = platformapi.AccessPlatformAPIWithRetry(a.client,
func() *http.Request {
request, _ := http.NewRequest(http.MethodPost, url, strings.NewReader(string(data)))
request, _ := http.NewRequest(http.MethodGet, url, strings.NewReader(string(data)))
request.Header.Set("Content-Type", "application/json")
return request
},

View File

@@ -35,7 +35,7 @@ func TestCode2(t *testing.T) {
func TestCode343(t *testing.T) {
a := New("5c8492ec2744fb72bb6cc356983f3cfc317f85d4", "ttaceeda5333d7a7ab01")
data, err := a.GetTiktokOauth("L7ItxFupOS4loNPC5fBq9JtnphlXJtKwrmvDqvMoK5dbqZ03uf8Cyoc_1bnoc_SzEARSi5FEhzZHROyv37b6dzEAUkzhm1RcQYYJtPfFV2FKWiDH5kYX1xIAFLY")
data, err := a.GetTiktokOauth("0G3WBJXM4kuYlM0UmbRsrg9Bx_7YOQJflKewL6F7qe5aQDoy9j2mxgigESyPMlXzPNnvYsn1Swix-3pabUfqS-_2_H3WzOI6aeU_bSW10LzA-gq-8j797BU4iL0")
fmt.Println(err)
fmt.Println(data)
}