Google API Client Library for .NET  1.10.0
Public Member Functions | Properties | List of all members
Google.Apis.Requests.RequestBuilder Class Reference

Utility class for building a URI using BuildUri or a HTTP request using CreateRequest from the query and path parameters of a REST call. More...

Public Member Functions

 RequestBuilder ()
 Construct a new request builder. More...
 
Uri BuildUri ()
 Constructs a Uri as defined by the parts of this request builder. More...
 
void AddParameter (RequestParameterType type, string name, string value)
 Adds a parameter value. More...
 
HttpRequestMessage CreateRequest ()
 Creates a new HTTP request message. More...
 

Properties

Uri BaseUri [get, set]
 The base URI for this request (usually applies to the service itself). More...
 
string Path [get, set]
 The path portion of this request. It's appended to the BaseUri and the parameters are substituted from the PathParameters dictionary. More...
 
string Method [get, set]
 The HTTP method used for this request (such as GET, PUT, POST, etc...). More...
 

Detailed Description

Utility class for building a URI using BuildUri or a HTTP request using CreateRequest from the query and path parameters of a REST call.

Constructor & Destructor Documentation

Google.Apis.Requests.RequestBuilder.RequestBuilder ( )
inline

Construct a new request builder.

TODO(peleyal): Consider using the Factory pattern here.

Member Function Documentation

void Google.Apis.Requests.RequestBuilder.AddParameter ( RequestParameterType  type,
string  name,
string  value 
)
inline

Adds a parameter value.

Parameters
typeType of the parameter (must be 'Path' or 'Query').
nameParameter name.
valueParameter value.
Uri Google.Apis.Requests.RequestBuilder.BuildUri ( )
inline

Constructs a Uri as defined by the parts of this request builder.

HttpRequestMessage Google.Apis.Requests.RequestBuilder.CreateRequest ( )
inline

Creates a new HTTP request message.

Property Documentation

Uri Google.Apis.Requests.RequestBuilder.BaseUri
getset

The base URI for this request (usually applies to the service itself).

string Google.Apis.Requests.RequestBuilder.Method
getset

The HTTP method used for this request (such as GET, PUT, POST, etc...).

The default Value is Google.Apis.Http.HttpConsts.Get.

string Google.Apis.Requests.RequestBuilder.Path
getset

The path portion of this request. It's appended to the BaseUri and the parameters are substituted from the PathParameters dictionary.


The documentation for this class was generated from the following file: