Package: matlab.net
Uniform resource identifier (URI)
The matlab.net.URI
class constructs an internet
uniform resource identifier (URI), such as a web address or a URL.
An internet URI is a string divided into components. Each component
is represented by a property of the URI
class. The
following text shows the properties and their associated punctuation,
separated by spaces for clarity. The spaces do not appear in the encoded
URI. The associated punctuation is not part of the property value.
Scheme: //Authority /Path(1) /Path(2) ... /Path(end) ?Query #Fragment
where Authority
contains these properties:
UserInfo@ Host :Port
Use the matlab.net.URI
string
or char
methods
to create an internet URI. These methods encode the properties by
adding punctuation to nonempty properties and by escaping reserved
characters.
All properties are optional. However, different uses might require certain properties to be set.
To eliminate a property and its punctuation from the output
string, set the property value to []
.
obj = matlab.net.URI
creates an empty URI.
obj = matlab.net.URI(
creates
the URI specified by destination
)destination
.
obj = matlab.net.URI(
sets
the destination
,queryVector
)Query
property to queryVector
. Query
values are appended to any query
parameters already specified in destination
.
obj = matlab.net.URI(
adds
one or more destination
,queryName
,queryValue
)queryName
,queryValue
parameters to the Query
property.
obj = matlab.net.URI(
adds destination
,queryVector
,queryName
,queryValue
)queryVector
and
the queryName
,queryValue
parameters to the Query
property.
obj = matlab.net.URI(___,
specifies
the format of the output when an array appears in a format
)queryValue
argument. You can use any
of the input arguments in the previous syntaxes.
obj = matlab.net.URI(___,'literal')
indicates that
destination
is already encoded. Use this option if you copy and
paste an already-encoded URI, for example, from the address bar of a browser. When you
read properties of this URI directly, you see the decoded version. The
'literal'
option does not permit you to construct an illegal URI. It
prevents reencoding of '%'
characters. Characters that must always be
encoded, such as '\'
and ' '
in the
Host
or Path
, are still
percent-encoded.
This option has no effect on Query
(matlab.net.QueryParameter
) arguments.
These methods implement the equivalent MATLAB functionality for this class.
eq | Compare URIs for equality. Two URIs are considered equal
if they refer to the same resource. An empty string or empty |
char | URI as character vector |
string | URI as string |
QueryParameter
| RequestMessage
| webread
| websave
| webwrite