Skip to content

Commit

Permalink
solve Authorization
Browse files Browse the repository at this point in the history
  • Loading branch information
Allan-Nava authored Sep 19, 2024
1 parent b231716 commit 68a1ba5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tiktok/resty.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func (o *tiktok) restyPost(url string, body interface{}) (*resty.Response, error
resp, err := o.restClient.R().
SetHeader("Accept", "application/json").
SetHeader("Content-Type", "application/json").
SetHeader("Auhtorization", "Bearer "+o.accessToken).
SetHeader("Authorization", "Bearer "+o.accessToken).
SetBody(body).
Post(url)

Expand All @@ -55,7 +55,7 @@ func (o *tiktok) restyPostWithQueryParams(url string, body interface{}, queryPa
resp, err := o.restClient.R().
SetHeader("Accept", "application/json").
SetHeader("Content-Type", "application/json").
SetHeader("Auhtorization", "Bearer "+o.accessToken).
SetHeader("Authorization", "Bearer "+o.accessToken).
SetQueryParams(queryParams).
SetBody(body).
Post(url)
Expand All @@ -68,7 +68,7 @@ func (o *tiktok) restyPostWithQueryParams(url string, body interface{}, queryPa

func (o *tiktok) restyGet(url string, queryParams map[string]string) (*resty.Response, error) {
resp, err := o.restClient.R().
SetHeader("Auhtorization", "Bearer "+o.accessToken).
SetHeader("Authorization", "Bearer "+o.accessToken).
SetQueryParams(queryParams).
Get(url)
//
Expand Down

0 comments on commit 68a1ba5

Please sign in to comment.