C# Class Crowbar.HttpPayload

Defines an HTTP payload.
Inheritance: IHttpPayload
Datei anzeigen Open project: mrydengren/crowbar Class Usage Examples

Private Properties

Property Type Description
ExtractQueryString string

Public Methods

Method Description
AjaxRequest ( ) : HttpPayload

Adds a header indicating that this is an AJAX request.

Body ( string body, string contentType = "application/octet-stream" ) : HttpPayload

Adds a body to the request.

Cookie ( System.Web.HttpCookie cookie ) : HttpPayload

Adds a cookie to the request.

FormValue ( string key, string value ) : HttpPayload

Adds a form value to the request.

Header ( string name, string value ) : HttpPayload

Adds a header to the request.

HttpPayload ( string method ) : System

Creates an instance of HttpPayload.

HttpRequest ( ) : HttpPayload

Configures the request to be sent over HTTP.

HttpsRequest ( ) : HttpPayload

Configures the request to be sent over HTTPS.

QueryString ( string key, string value ) : HttpPayload

Adds a query string entry.

Private Methods

Method Description
ExtractQueryString ( string path ) : string

Method Details

AjaxRequest() public method

Adds a header indicating that this is an AJAX request.
public AjaxRequest ( ) : HttpPayload
return HttpPayload

Body() public method

Adds a body to the request.
public Body ( string body, string contentType = "application/octet-stream" ) : HttpPayload
body string A string that should be used as the request body.
contentType string The content type.
return HttpPayload

Cookie() public method

Adds a cookie to the request.
public Cookie ( System.Web.HttpCookie cookie ) : HttpPayload
cookie System.Web.HttpCookie The cookie that should be added.
return HttpPayload

FormValue() public method

Adds a form value to the request.
public FormValue ( string key, string value ) : HttpPayload
key string The name of the form element.
value string The value of the form element.
return HttpPayload

Header() public method

Adds a header to the request.
public Header ( string name, string value ) : HttpPayload
name string The name of the header.
value string The name of the value.
return HttpPayload

HttpPayload() public method

Creates an instance of HttpPayload.
public HttpPayload ( string method ) : System
method string The HTTP method.
return System

HttpRequest() public method

Configures the request to be sent over HTTP.
public HttpRequest ( ) : HttpPayload
return HttpPayload

HttpsRequest() public method

Configures the request to be sent over HTTPS.
public HttpsRequest ( ) : HttpPayload
return HttpPayload

QueryString() public method

Adds a query string entry.
public QueryString ( string key, string value ) : HttpPayload
key string The name of the entry.
value string The value of the entry.
return HttpPayload