Method | Description | |
---|---|---|
AddPostFile ( string key, string fileName ) : bool |
Allows posting a file to the Web Server. Make sure that you set PostMode
|
|
AddPostKey ( byte fullPostBuffer ) : void |
Adds a fully self contained POST buffer to the request. Works for XML or previously encoded content.
|
|
AddPostKey ( string fullPostBuffer ) : void |
Adds a fully self contained POST buffer to the request. Works for XML or previously encoded content.
|
|
AddPostKey ( string key, byte value ) : void |
Adds POST form variables to the request buffer. PostMode determines how parms are handled.
|
|
AddPostKey ( string key, string value ) : void |
Adds POST form variables to the request buffer. PostMode determines how parms are handled.
|
|
CreateWebRequestObject ( string Url ) : bool |
Creates a new WebRequest instance that can be set prior to calling the various Get methods. You can then manipulate the WebRequest property, to custom configure the request. Instead of passing a URL you can then pass null. Note - You need a new Web Request for each and every request so you need to set this object for every call if you manually customize it.
|
|
Dispose ( ) : void |
Releases response and request data
|
|
DownloadBytes ( string url, long bufferSize = 8192 ) : byte[] |
Retrieves URL into an Byte Array. Fires the ReceiveData Event |
|
DownloadBytesAsync ( string url, long bufferSize = 8192 ) : Task |
Retrieves URL into an Byte Array. Fires the ReceiveData Event |
|
DownloadFile ( string url, long bufferSize, string outputFile ) : bool |
Writes the output from the URL request to a file firing events.
|
|
DownloadResponse ( string url ) : HttpWebResponse |
Return an HttpWebResponse object for a request. You can use the Response to read the result as needed. This is a low level method. Most of the other 'Get' methods call this method and process the results further. Important: The Response object's Close() method must be called when you are done with the object. |
|
DownloadResponseAsync ( string url ) : Task |
||
DownloadStream ( string url ) : StreamReader |
Return a the result from an HTTP Url into a StreamReader. Client code should call Close() on the returned object when done reading.
|
|
DownloadString ( string url, long bufferSize = 8192, Encoding encoding = null ) : string |
Returns the content of a URL as a string using a specified Encoding
|
|
DownloadStringAsync ( string url, long bufferSize = 8192, Encoding encoding = null ) : Task |
Returns the content of a URL as a string using a specified Encoding
|
|
DownloadStringPartial ( string url, int size ) : string |
Returns a partial response from the URL by specifying only given number of bytes to retrieve. This can reduce network traffic and keep string formatting down if you are only interested a small port at the top of the page. Also returns full headers.
|
|
HttpClient ( ) : System |
The HttpClient Default Constructor
|
|
ResetPostData ( ) : void |
Resets the Post buffer by clearing out all existing content
|
|
SetPostStream ( Stream postStream ) : void |
Method | Description | |
---|---|---|
StreamPostBuffer ( Stream PostData ) : void |
Sends the Postbuffer to the server
|
Method | Description | |
---|---|---|
CheckCertificateCallback ( object sender, |
Handles the Certificate check
|
|
GetUrl ( string url, long bufferSize = 8192, Encoding encoding = null ) : string | ||
GetUrlBytes ( string url, long bufferSize = 8192 ) : byte[] | ||
GetUrlFile ( string Url, long BufferSize, string OutputFile ) : bool | ||
GetUrlPartial ( string url, int size ) : string | ||
GetUrlResponse ( string url ) : HttpWebResponse | ||
GetUrlStream ( string Url ) : StreamReader |
public AddPostFile ( string key, string fileName ) : bool | ||
key | string | |
fileName | string | |
return | bool |
public AddPostKey ( byte fullPostBuffer ) : void | ||
fullPostBuffer | byte | Byte array of a full POST buffer |
return | void |
public AddPostKey ( string fullPostBuffer ) : void | ||
fullPostBuffer | string | String based full POST buffer |
return | void |
public AddPostKey ( string key, byte value ) : void | ||
key | string | Key value or raw buffer depending on post type |
value | byte | Value to store. Used only in key/value pair modes |
return | void |
public AddPostKey ( string key, string value ) : void | ||
key | string | Key value or raw buffer depending on post type |
value | string | Value to store. Used only in key/value pair modes |
return | void |
public CreateWebRequestObject ( string Url ) : bool | ||
Url | string | |
return | bool |
public DownloadBytes ( string url, long bufferSize = 8192 ) : byte[] | ||
url | string | Url to read |
bufferSize | long | Size of the buffer for each read. 0 = 8192 |
return | byte[] |
public DownloadBytesAsync ( string url, long bufferSize = 8192 ) : Task |
||
url | string | Url to read |
bufferSize | long | Size of the buffer for each read. 0 = 8192 |
return | Task |
public DownloadFile ( string url, long bufferSize, string outputFile ) : bool | ||
url | string | Url to fire |
bufferSize | long | Buffersize - how often to fire events |
outputFile | string | File to write response to |
return | bool |
public DownloadResponse ( string url ) : HttpWebResponse | ||
url | string | Url to retrieve. |
return | HttpWebResponse |
public DownloadResponseAsync ( string url ) : Task |
||
url | string | |
return | Task |
public DownloadStream ( string url ) : StreamReader | ||
url | string | Url to retrieve. |
return | StreamReader |
public DownloadString ( string url, long bufferSize = 8192, Encoding encoding = null ) : string | ||
url | string | |
bufferSize | long | Internal download buffer size used to hold data chunks. |
encoding | Encoding | A .NET Encoding scheme or null to attempt sniffing from Charset. |
return | string |
public DownloadStringAsync ( string url, long bufferSize = 8192, Encoding encoding = null ) : Task |
||
url | string | |
bufferSize | long | Internal download buffer size used to hold data chunks. |
encoding | Encoding | A .NET Encoding scheme or null to attempt sniffing from Charset. |
return | Task |
public DownloadStringPartial ( string url, int size ) : string | ||
url | string | |
size | int | |
return | string |
public SetPostStream ( Stream postStream ) : void | ||
postStream | Stream | |
return | void |
protected StreamPostBuffer ( Stream PostData ) : void | ||
PostData | Stream | |
return | void |