C# 0 The Complete Reference


PART II C h a p t e r   2 5



Download 4,07 Mb.
Pdf ko'rish
bet1020/1096
Sana23.01.2022
Hajmi4,07 Mb.
#402171
1   ...   1016   1017   1018   1019   1020   1021   1022   1023   ...   1096
Bog'liq
C-Sharp 3 The Complete Reference Herbert Schildt


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    

825


Method

Description

public static WebRequest Create(string 

uri

)

Creates a 



WebRequest

 object for the URI 

specified by the string passed by 

uri.

 The object 

returned will implement the protocol specified by 

the prefix of the URI. Thus, the object will be an 

instance of a class that inherits 

WebRequest

. A 

NotSupportedException



 is thrown if the requested 

protocol is not available. A 

UriFormatException

 is 


thrown if the URI format is invalid. 

public static WebRequest Create(Uri 



uri

)

Creates a 



WebRequest

 object for the URI specified 

by

uri.

 The object returned will implement the 

protocol specified by the prefix of the URI. Thus, 

the object will be an instance of a class that 

inherits

WebRequest

. A 

NotSupportedException



 is 

thrown if the requested protocol is not available.

public vir tual Stream GetRequestStream( )

Returns an output stream associated with the 

previously requested URI.

public vir tual WebResponse GetResponse( )

Sends the previously created request and waits 

for a response. When a response is received, it is 

returned as a 

WebReponse

 object. Your program 

will use this object to obtain information from the 

specified URI. 

T

ABLE



 25-1 

The Methods Defi ned by 

WebRequest

 that Suppor t Synchronous Communications

Property

Description

public AuthenticationLevel

    AuthenticationLevel( get; set; }

Obtains or sets the authentication level. 

public vir tual RequestCachePolicy

    CachePolicy { get; set; }

Obtains or sets the cache policy, which controls 

when a response can be obtained from the cache. 

public vir tual string

     ConnectionGroupName { get; set; }

Obtains or sets the connection group name. 

Connection groups are a way of creating a set of 

requests. They are not needed for simple Internet 

transactions.

public vir tual long ContentLength { get; set; }

Obtains or sets the length of the content.

public vir tual string ContentType { get; set; }

Obtains or sets the description of the content.

public vir tual ICredentials

     Credentials { get; set; }

Obtains or sets credentials. 

public static RequestCachePolicy

    DefaultCachePolicy { get; set; }

Obtains or sets the default cache policy, which 

controls when a request can be obtained from the 

cache.

T

ABLE



 25-2 

The Proper ties Defi ned by 

WebRequest

www.freepdf-books.com




826

 

P a r t   I I :  



E x p l o r i n g   t h e   C #   L i b r a r y


Download 4,07 Mb.

Do'stlaringiz bilan baham:
1   ...   1016   1017   1018   1019   1020   1021   1022   1023   ...   1096




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish