GoFiler Legato Script Reference
Legato v 1.5d Application v 5.25a
|
Table of Contents | < < Previous | Next >> |
Chapter Twelve — Internet Functions (continued)
Overview
The HTTPSetUserAgent function sets the default user agent for making HTTP requests.
Syntax/Parameters
Syntax
int = HTTPSetUserAgent ( string data );
Parameters
data
A string up to 256 characters specifying the new user agent string.
Return Value
An int as ERROR_NONE or a formatted error code on failure.
Remarks
If an internet object is not open, the default open will be opened. There are no exposed API functions to control or close the internet object.
A user agent string identifies the client (Legato or the hosting application) to a web server when an HTTP request is made. The user agent is set as part of the HTTP header and can can change the behavior of a remote server’s response.
The default Windows 10/11 user agent is normally:
Mozilla/5.0 (compatible; <AppVersion>; <OSVersion>)
The default string makes Legato or the host application look like a browser.
If crawling or scraping web pages, some sites may require (request) that you identify as a bot.
Related Functions
Platform Support
Go13, Go16, GoFiler Complete, GoFiler Corporate, GoFiler, GoFiler Lite, GoXBRL
Legato IDE, Legato Basic
Page revised 2024-12-13
Table of Contents | < < Previous | Next >> |
© 2012-2024 Novaworks, LLC. All rights reserved worldwide. Unauthorized use, duplication or transmission prohibited by law. Portions of the software are protected by US Patents 10,095,672, 10,706,221 and 11,210,456. GoFiler™ and Legato™ are trademarks of Novaworks, LLC. EDGAR® is a federally registered trademark of the U.S. Securities and Exchange Commission. Novaworks is not affiliated with or approved by the U.S. Securities and Exchange Commission. All other trademarks are property of their respective owners. Use of the features specified in this language are subject to terms, conditions and limitations of the Software License Agreement.