Time:09-29
I'm trying to download a json file from
CodePudding user response:
Simply add a User-Agent request header: req.Header.Set("User-Agent", "xxx")
User-Agent
req.Header.Set("User-Agent", "xxx")
Without seeing the docs, I'm not sure why this is, but any arbitrary value seems to do.
Page link:https//www.codepudding.com/database/131907.html