C# Class gdapi.WebRequest

Represents a WebRequest to the API
Mostrar archivo Open project: godaddy/gdapi-csharp

Public Methods

Method Description
WebRequest ( Client client ) : System.Collections.Generic

Creates a new WebRequest

addParam ( string>.KeyValuePair kvp ) : void

Add a parameter to the query string of the request.

getResponse ( ) : string

Returns the complete response body or the request.

setBody ( string body ) : void

Sets the request body.

setQuery ( string query ) : void

Sets the query string of the request.

setType ( string type ) : void

Sets the type of the request.

setUrl ( string url ) : void

Sets the Url of the request.

Method Details

WebRequest() public method

Creates a new WebRequest
public WebRequest ( Client client ) : System.Collections.Generic
client Client Client to use for all communications.
return System.Collections.Generic

addParam() public method

Add a parameter to the query string of the request.
public addParam ( string>.KeyValuePair kvp ) : void
kvp string>.KeyValuePair A key value pair to append to the query string of the request.
return void

getResponse() public method

Returns the complete response body or the request.
/// If the request returns a 404 error a NotFoundException is thrown. ///
public getResponse ( ) : string
return string

setBody() public method

Sets the request body.
public setBody ( string body ) : void
body string String representing the request body.
return void

setQuery() public method

Sets the query string of the request.
public setQuery ( string query ) : void
query string Query string to append to the request.
return void

setType() public method

Sets the type of the request.
public setType ( string type ) : void
type string Type to set the request to, most likely GET, PUT, or POST.
return void

setUrl() public method

Sets the Url of the request.
public setUrl ( string url ) : void
url string /// Full url to set the url to. ///
return void