Method HttpRequestMessage() :new() Foundation

Creates an instance of the HttpRequestMessage class.

:new( <cUri> ) --> oHttpRequestMessage
A character string with the URI of the server the request message is going to be sent to.

The class method :new() returns a HttpRequestMessage object.


When passing the URI to the HttpClient():new() method, an instance of the HttpRequestMessage() class is automatically created and assigned to the HTTP client's :httpRequest instance variable. If additional control over the request message and sending the message is required, a developer can create a custom request message instance by passing the URI to the :new() method of the HttpRequestMessage() class. This instance can then be used multiple times with HTTP client objects in :send(), :sendAsync() or :getFile() operations.

To gain even more control, developers can subclass from HttpRequestMessage(), spezialize behavior of the class and then pass instances of their own class to the :send() or :sendAsync() method of the HttpClient class.


If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.