Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the proper user-agent to use for a server?

For Filepicker.io we built "grab from url", but certain sites aren't happy with not passing a User-Agent header. I could just use a stock browser user agent as suggested in some other answers, but as a good web citizen I wanted to know if there isa more appropriate user-agent to set for a server requesting another server's data?

like image 602
brettcvz Avatar asked Nov 14 '22 03:11

brettcvz


1 Answers

Depends on the language you wrote your server in. For example, Python's urllib sets a default value to User-agent: Python-urllib/2.1, but you can just as easily set it to something like User-agent: filepicker.io/<your-version-here> or something more language specific if you'd like.

like image 179
simpleproof Avatar answered Dec 15 '22 15:12

simpleproof