System::Net::HttpWebRequest class

HttpWebRequest class

Represents the HTTP web request. Objects of this class should only be allocated using System::MakeObject() function. Never create instance of this type on stack or using operator new, as it will result in runtime errors and/or assertion faults. Always wrap this class into System::SmartPtr pointer and use this pointer to pass it to functions as argument.

class HttpWebRequest : public System::Net::WebRequest

Methods

MethodDescription
Abort() overrideAborts the current request.
virtual AddRange(int32_t)Adds the ‘Range’ header to the current request.
virtual AddRange(System::String, int32_t, int32_t)Adds the ‘Range’ header to the current request.
BeginGetRequestStream(AsyncCallback, System::SharedPtr<Object>) overrideInitiates an asynchronous operation to get a stream for writing data to the resource.
BeginGetResponse(AsyncCallback, System::SharedPtr<Object>) overrideInitiates an asynchronous request for the resource.
EndGetRequestStream(System::SharedPtr<IAsyncResult>) overrideWaits until the specified asynchronous operation to get a stream completes.
EndGetResponse(System::SharedPtr<IAsyncResult>) overrideWaits until the specified asynchronous request for the resource completes.
get_Accept()Gets the ‘Accept’ HTTP header value.
virtual get_AllowAutoRedirect()Gets a value that indicates if the request should follow redirections.
virtual get_AllowReadStreamBuffering()Gets a value indicates if the data received from the resource must be buffered.
virtual get_AllowWriteStreamBuffering()Gets a value that indicates if buffering is enabled for sending data.
virtual get_ClientCertificates()Gets the collection of the certificates that are associated with the current request.
get_ConnectionGroupName() overrideGets the name of the connection group.
get_ContentLength() overrideGets the number of bytes of the request data to sent.
get_ContentType() overrideGets the MIME type of the request.
get_ContinueTimeout()Gets a timeout to wait until the 100-Continue status code is received.
virtual get_CookieContainer()Gets a cookie container associated with the current web request.
get_Credentials() overrideGets authentication information that is associated with the current request.
virtual get_HaveResponse()Returns a value that indicates if a response is received.
get_Headers() overrideGets the collection of the HTTP headers.
virtual get_KeepAlive()Gets a value that indicates if the current request must contain the ‘Keep-Alive’ header.
virtual get_MaximumAutomaticRedirections()Gets a maximum number of allowed redirections.
get_Method() overrideGets the HTTP method.
get_PreAuthenticate() overrideGets a value that indicates if the request must be pre-authenticated.
get_Proxy() overrideGets the HTTP proxy.
virtual get_Referer()Gets a value of the ‘Referer’ header.
get_RequestUri() overrideReturns the request URI.
virtual get_SendChunked()Gets a value that indicates if data must be sent in segments.
get_ServicePoint()Returns a service point that represents the network connection to the resource.
virtual get_SupportsCookieContainer()Returns a value that indicates if the current request can use a cookie container.
get_Timeout() overrideGets an amount of time in milliseconds after which the request will be timed out.
get_UseDefaultCredentials() overrideGets a value that indicates if the ‘Credential’ property is equal to the ‘DefaultCredentials’ property.
virtual get_UserAgent()Gets a value of the ‘User-Agent’ header.
GetRequestStream() overrideReturns the stream for writing data to the resource.
GetResponse() overrideReturns the web response associated with the current web request.
HttpWebRequest(System::SharedPtr<Uri>)Constructs a new instance.
set_Accept(String)Sets the ‘Accept’ HTTP header value.
virtual set_AllowAutoRedirect(bool)Sets a value that indicates if the request should follow redirections.
virtual set_AllowReadStreamBuffering(bool)Sets a value indicates if the data received from the resource must be buffered.
virtual set_AllowWriteStreamBuffering(bool)Sets a value that indicates if buffering is enabled for sending data.
virtual set_ClientCertificates(System::SharedPtr<System::Security::Cryptography::X509Certificates::X509CertificateCollection>)Sets the collection of the certificates that are associated with the current request.
set_ConnectionGroupName(System::String) overrideSets the name of the connection group.
set_ContentLength(int64_t) overrideSets the number of bytes of the request data to sent.
set_ContentType(String) overrideSets the MIME type of the request.
set_ContinueTimeout(int32_t)Sets a timeout to wait until the 100-Continue status code is received.
virtual set_CookieContainer(System::SharedPtr<System::Net::CookieContainer>)Sets a cookie container associated with the current web request.
set_Credentials(System::SharedPtr<ICredentials>) overrideSets authentication information that is associated with the current request.
set_Headers(System::SharedPtr<WebHeaderCollection>) overrideSets the collection of the HTTP headers.
virtual set_KeepAlive(bool)Sets a value that indicates if the current request must contain the ‘Keep-Alive’ header.
virtual set_MaximumAutomaticRedirections(int)Sets a maximum number of allowed redirections.
set_Method(String) overrideSets the HTTP method.
set_PreAuthenticate(bool) overrideSets a value that indicates if the request must be pre-authenticated.
set_ProtocolVersion(System::Version)RTTI information.
set_Proxy(System::SharedPtr<IWebProxy>) overrideSets the HTTP proxy.
virtual set_Referer(System::String)Sets a value of the ‘Referer’ header.
virtual set_SendChunked(bool)Sets a value that indicates if data must be sent in segments.
set_Timeout(int) overrideSets an amount of time in milliseconds after which the request will be timed out.
set_UseDefaultCredentials(bool) overrideSets a value that indicates if the ‘Credential’ property is equal to the ‘DefaultCredentials’ property.
virtual set_UserAgent(System::String)Sets a value of the ‘User-Agent’ header.

See Also