Update medium_client.go

This commit is contained in:
mycodedoesnotcompile2 2025-12-13 12:41:04 +00:00 committed by GitHub
parent 348e4e2527
commit 8b00007fb5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -61,6 +61,7 @@ func PostData(postId string) (*entities.MediumResponse, error) {
} }
req, err := http.NewRequest(method, urlreq, payload) req, err := http.NewRequest(method, urlreq, payload)
req.Header.Set("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36")
if err != nil { if err != nil {
log.Printf("Error constructing request %v\n", err) log.Printf("Error constructing request %v\n", err)
return nil, err return nil, err