. Notice how few lines of code are involved. By changing the string specified by
you can download information from any URI, including specific files.
PART II
C h a p t e r 2 5 :
N e t w o r k i n g T h r o u g h t h e I n t e r n e t U s i n g S y s t e m . N e t
845
public byte[ ]
UploadData(Uri
uri
,
string
how
,
byte[ ]
info
)
Writes the information specified by
info
to the URI specified
by
uri.
The response is returned. The string passed in
how
specifies how the information will be written.
public byte[ ]
UploadFile(string
uri
, string
fname
)
Writes the information in the file specified by
fname
to the
URI specified by
uri.
The response is returned.
public byte[ ]
UploadFile(Uri
uri
, string
fname
)
Writes the information in the file specified by
fname
to the
URI specified by
uri.
The response is returned.
public byte[ ]
UploadFile(string
uri
,
string
how
,
string
fname
)
Writes the information in the file specified by
fname
to the
URI specified by
uri.
The response is returned. The string
passed in
how
specifies how the information will be written.
public byte[ ]
UploadFile(Uri
uri
,
string
how
,
string
fname
)
Writes the information in the file specified by
fname
to the
URI specified by
uri.
The response is returned. The string
passed in
how
specifies how the information will be written.
public string UploadString(string
uri
, string
str
)
Writes
str
to the URI specified by
uri.
The response is
returned.
public string UploadString(Uri
uri
, string
str
)
Writes
str
to the URI specified by
uri.
The response is
returned.
public string UploadString(string
uri
,
string
how
,
string
str
)
Writes
str
to the URI specified by
uri.
The response is
returned. The string passed in
how
specifies how the
information will be written.
public string UploadString(Uri
uri
,
string how,
string
str
)
Writes
str
to the URI specified by
uri
. The response is
returned. The string passed in
how
specifies how the
information will be written.
public byte[ ]
UploadValues(string
uri
,
NameValueCollection
vals
)
Writes the values in the collection specified by
vals
to the
URI specified by
uri.
The response is returned.
public byte[ ]
UploadValues(Uri
uri
,
NameValueCollection
vals
)
Writes the values in the collection specified by
vals
to the
URI specified by
uri.
The response is returned.
public byte[ ]
UploadValues(string
uri
,
string
how
,
NameValueCollection
vals
)
Writes the values in the collection specified by
vals
to the
URI specified by
uri.
The response is returned. The string
passed in
how
specifies how the information will be written.
public byte[ ]
UploadValues(Uri
uri
,
string
how
,
NameValueCollection
vals
)
Writes the values in the collection specified by
vals
to the
URI specified by
uri.
The response is returned. The string
passed in
how
specifies how the information will be written.
T
ABLE
25-7
The Synchronous Methods Defi ned by
WebClient
(continued)
Method
Description
Although
Do'stlaringiz bilan baham: