C# Класс gdapi.WebRequest

Represents a WebRequest to the API
Показать файл Открыть проект

Открытые методы

Метод Описание
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.

Описание методов

WebRequest() публичный Метод

Creates a new WebRequest
public WebRequest ( Client client ) : System.Collections.Generic
client Client Client to use for all communications.
Результат System.Collections.Generic

addParam() публичный Метод

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.
Результат void

getResponse() публичный Метод

Returns the complete response body or the request.
/// If the request returns a 404 error a NotFoundException is thrown. ///
public getResponse ( ) : string
Результат string

setBody() публичный Метод

Sets the request body.
public setBody ( string body ) : void
body string String representing the request body.
Результат void

setQuery() публичный Метод

Sets the query string of the request.
public setQuery ( string query ) : void
query string Query string to append to the request.
Результат void

setType() публичный Метод

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.
Результат void

setUrl() публичный Метод

Sets the Url of the request.
public setUrl ( string url ) : void
url string /// Full url to set the url to. ///
Результат void