C# Class Argentini.Halide.H3HttpPost

Simple method to submit post data to a url.
Datei anzeigen Open project: argentini/Halide

Public Methods

Method Description
H3HttpPost ( ) : System

Default constructor.

H3HttpPost ( String url ) : System

Constructor that accepts a url as a parameter

H3HttpPost ( String url, NameValueCollection values ) : System

Constructor allowing the setting of the url and items to post.

Post ( ) : String

Posts the supplied data to specified url.

Post ( Int32 timeout ) : String

Posts the supplied data to specified url.

Post ( String url ) : String

Posts the supplied data to specified url.

Post ( String url, Int32 timeout ) : String

Posts the supplied data to specified url.

Post ( String url, NameValueCollection values ) : String

Posts the supplied data to specified url.

Post ( String url, NameValueCollection values, Int32 timeout ) : String

Posts the supplied data to specified url.

PostData ( String url, String postData, String contentType, Int32 timeout ) : String

Posts data to a specified url. Note that this assumes that you have already url encoded the post data.

PostData ( String url, String postData, String contentType, Int32 timeout, string>.Dictionary headerProps ) : String

Posts data to a specified url. Note that this assumes that you have already url encoded the post data.

Private Methods

Method Description
EncodeAndAddItem ( StringBuilder &baseRequest, String key, String dataItem ) : void

Encodes an item and adds it to the string.

Method Details

H3HttpPost() public method

Default constructor.
public H3HttpPost ( ) : System
return System

H3HttpPost() public method

Constructor that accepts a url as a parameter
public H3HttpPost ( String url ) : System
url String The url where the post will be submitted to.
return System

H3HttpPost() public method

Constructor allowing the setting of the url and items to post.
public H3HttpPost ( String url, NameValueCollection values ) : System
url String the url for the post.
values System.Collections.Specialized.NameValueCollection The values for the post.
return System

Post() public method

Posts the supplied data to specified url.
public Post ( ) : String
return String

Post() public method

Posts the supplied data to specified url.
public Post ( Int32 timeout ) : String
timeout System.Int32 Timeout for the request, in milliseconds (default is 10,000; 10 seconds).
return String

Post() public method

Posts the supplied data to specified url.
public Post ( String url ) : String
url String The url to post to.
return String

Post() public method

Posts the supplied data to specified url.
public Post ( String url, Int32 timeout ) : String
url String The url to post to.
timeout System.Int32 Timeout for the request, in milliseconds (default is 10,000; 10 seconds).
return String

Post() public method

Posts the supplied data to specified url.
public Post ( String url, NameValueCollection values ) : String
url String The url to post to.
values System.Collections.Specialized.NameValueCollection The values to post.
return String

Post() public method

Posts the supplied data to specified url.
public Post ( String url, NameValueCollection values, Int32 timeout ) : String
url String The url to post to.
values System.Collections.Specialized.NameValueCollection The values to post.
timeout System.Int32 Timeout for the request, in milliseconds (default is 10,000; 10 seconds).
return String

PostData() public method

Posts data to a specified url. Note that this assumes that you have already url encoded the post data.
public PostData ( String url, String postData, String contentType, Int32 timeout ) : String
url String the url to post to.
postData String The data to post.
contentType String Content type to use (e.g. "application/x-www-form-urlencoded")
timeout System.Int32 Number of milliseconds before the request times out.
return String

PostData() public method

Posts data to a specified url. Note that this assumes that you have already url encoded the post data.
public PostData ( String url, String postData, String contentType, Int32 timeout, string>.Dictionary headerProps ) : String
url String the url to post to.
postData String The data to post.
contentType String Content type to use (e.g. "application/x-www-form-urlencoded")
timeout System.Int32 Number of milliseconds before the request times out.
headerProps string>.Dictionary Dictionary of header key and value pairs, or null for none
return String