matlab.net.http.RequestMessage Class
Namespace: matlab.net.http
Superclasses: matlab.net.http.Message
HTTP request message
Description
Use the RequestMessage
class to format HTTP request messages to send to a
server for processing. Use the send
method to send the message, or the
complete
method to validate the message before sending. These methods fill
in any necessary header fields and other message properties.
Creation
Description
obj = matlab.net.http.RequestMessage
creates a request message
with default values. When you send or complete a message, the default
Method
property is RequestMethod.GET
.
obj = matlab.net.http.RequestMessage(method,header,body)
specifies one or more optional message properties. You can omit
trailing arguments and use []
to specify any placeholders.
obj = matlab.net.http.RequestMessage(requestLine,header,body)
sets the RequestLine
property to
requestLine
. Use this syntax if you need control over the contents of
the request line. For example, to send a message explicitly to a proxy, set the
RequestLine.RequestTarget
property to the full URI. Otherwise,
MATLAB chooses the proxy based on your proxy settings, and the send
method sets the RequestTarget
to the Path
property of the URI.
obj = matlab.net.http.RequestMessage(requestLine,header,provider)
gets the message body data from a matlab.net.http.io.ContentProvider
.
Properties
Methods
Examples
Version History
Introduced in R2016b
See Also
webread
| ResponseMessage
| RequestLine
| RequestMethod
| matlab.net.URI
| MessageBody