Skip to content

Commit

Permalink
static variables updated
Browse files Browse the repository at this point in the history
  • Loading branch information
erkanzsy committed Jul 6, 2023
1 parent 0d20056 commit dc85e32
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions threds_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ func UserThreads(username, userId string) (UserThreadsData, error) {

userThreads := UserThreadsData{}

request, err := http.NewRequest("POST", "https://www.threads.net/api/graphql", bytes.NewBufferString(data.Encode()))
request, err := http.NewRequest("POST", GRAPHQL, bytes.NewBufferString(data.Encode()))
if err != nil {
return userThreads, err
}
Expand Down Expand Up @@ -182,7 +182,7 @@ func getDefaultHeaders(username string) http.Header {
headers.Set("cache-control", "no-cache")
headers.Set("origin", "https://www.threads.net")
headers.Set("pragma", "no-cache")
headers.Set("referer", "https://www.threads.net/@"+username)
headers.Set("referer", fmt.Sprintf("%s/@%s", URL, username))
headers.Set("sec-ch-prefers-color-scheme", "dark")
headers.Set("sec-ch-ua", "\"Not.A/Brand\";v=\"8\", \"Chromium\";v=\"114\", \"Google Chrome\";v=\"114\"")
headers.Set("sec-ch-ua-full-version-list", "\"Not.A/Brand\";v=\"8.0.0.0\", \"Chromium\";v=\"114.0.5735.198\", \"Google Chrome\";v=\"114.0.5735.198\"")
Expand Down

0 comments on commit dc85e32

Please sign in to comment.