all: use http package to replace http method names (#26535)

This commit is contained in:
Shude Li
2023-01-24 11:12:25 +02:00
committed by GitHub
parent e4fa2cf5e3
commit 163e996d0e
7 changed files with 12 additions and 12 deletions
+2 -2
View File
@@ -747,7 +747,7 @@ func authTwitter(url string, tokenV1, tokenV2 string) (string, string, string, c
func authTwitterWithTokenV1(tweetID string, token string) (string, string, string, common.Address, error) {
// Query the tweet details from Twitter
url := fmt.Sprintf("https://api.twitter.com/1.1/statuses/show.json?id=%s", tweetID)
req, err := http.NewRequest("GET", url, nil)
req, err := http.NewRequest(http.MethodGet, url, nil)
if err != nil {
return "", "", "", common.Address{}, err
}
@@ -784,7 +784,7 @@ func authTwitterWithTokenV1(tweetID string, token string) (string, string, strin
func authTwitterWithTokenV2(tweetID string, token string) (string, string, string, common.Address, error) {
// Query the tweet details from Twitter
url := fmt.Sprintf("https://api.twitter.com/2/tweets/%s?expansions=author_id&user.fields=profile_image_url", tweetID)
req, err := http.NewRequest("GET", url, nil)
req, err := http.NewRequest(http.MethodGet, url, nil)
if err != nil {
return "", "", "", common.Address{}, err
}