initialize
Class: matlab.net.http.io.StringConsumer
Namespace: matlab.net.http.io
Prepare StringConsumer for new HTTP message
Syntax
OK = initialize(consumer)
Description
prepares this OK = initialize(consumer)StringConsumer for receipt of a message.
MATLAB® calls this method, which is an overridden method of initialize.
initialize returns true if one of the following
occurs. Otherwise, it returns false.
Response.StatusisOKand theCharsetproperty is not empty.ContentType is set to a
MediaTypewith a known or default charset.
You can process a message with an empty Charset
property or with an unknown matlab.net.http.MediaType. To do this,
set Charset after creating the consumer or write a subclass that
overrides this method to set Charset before invoking
initialize.
See the StringConsumer constructor for a list of known default charsets.
Input Arguments
Attributes
Access | protected |
Version History
Introduced in R2018a
See Also
Response | ContentType | matlab.net.http.MediaType | initialize