|
<< Click to Display Table of Contents >> Navigation: ThinBASIC Modules > CURL > cUrl_Http > <cUrl_Http> Request Properties > <cUrl_Http>.UserAgent |
Description
Get / Set Curl User Agent.
Syntax
' GET
UserAgentString = <cUrl_Http>.UserAgent
' SET
<cUrl_Http>.UserAgent = UserAgentString
Returns
String.
Parameters
Name |
Type |
Optional |
Meaning |
UserAgentString |
String |
Yes |
User Agent |
Remarks
A User-Agent (UA) string is information included in the HTTP header, acting on behalf of a user. When you connect to a website from a browser, the UA informs the website from which browser the request is coming from, its version number and operating system.
A server may respond differently to specific user agents. Therefore, you might find yourself needing to change the UA string.
If you give an empty argument to user agent (""), it removes the header completely from the request.
By default, curl uses curl/VERSION, such as User-Agent: curl/8.12.1.
If user-agent is provided several times, the last set value is used.
Official documentation of the location flag: https://curl.se/docs/manpage.html#-A
Restrictions
See also
Examples