GoFiler Legato Script Reference
Legato v 1.5d Application v 5.25a
|
Table of Contents | < < Previous | Next >> |
Chapter Twelve — Internet Functions (continued)
Overview
The HTTPRawRequest function can be used to create an HTTP request that is customized. This function allows for usage of both standard and non-standard HTTP verbs as well as any body formats and additional headers.
Syntax/Parameters
Syntax
string = HTTPRawRequest ( [handle hHTTP], string uri, [string verb],
[string
headers], [string body], [handle result])
Parameters
hHTTP
An optional handle specifying an existing HTTP connection to employ for the transaction. If a handle is used, the HTTP type and authority (domain) must match for the supplied uri parameter.
uri
A string as a valid URI (which must contain the scheme HTTP or HTTPS) or a path with an optional query. The URI can contain query information but cannot contain multi-part requests. The uri can contain just the path and an optional query when an HTTP connection handle is used.
verb
An optional string indicating the HTTP verb used to make the request. the default is “GET”.
headers
An optional string specifying any additional headers to the request. These headers must be in proper HTTP format. The application may attach cookies to the request if there are cookies for the domain.
body
An optional string specifying the body of the request.
result
An optional handle value for a File Object to receive the response data.
Return Value
A string containing the reply data. On error the string will be empty. Use the GetLastError function to get the formatted error code or the HTTP response code and GetLastErrorMessage to return details of the error.
If a response file is provided, the string will contain “(response in file)”.
Note that a non-empty string does not indicate success. If the post reaches a server and the page is not found or the parameters are incorrect, the server may respond with an error page returned as the string.
Remarks
The HTTPRawRequest function allows for complex or different formats that may not be supported by other functions. For example, the HTTPPost function posts only in multipart form data format.
Reply or response data can be captured in string form or in the form of a file. If the data may exceed 2MB, a file should be employed.
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.