WebApiClient T  GenerateUri Method The WebApiClient Documentation
Generates a Uri string based on the parameters provided

Namespace: WebApiRestService
Assembly: WebApiClient (in WebApiClient.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
protected string GenerateUri(
	string controller,
	string action,
	Object param
)

Parameters

controller
Type: System String
The controller that will be called. Required.
action
Type: System String
The action that will be called. Optional.
param
Type: System Object
Can be a simple type like int, string, etc or an anonymous type defining many properties. Optional.

Return Value

Type: String
The complete Uri that will be used to call the Web Api
Exceptions
ExceptionCondition
ArgumentNullException
Remarks
The generated Uri can be formatted in one of the following types:
  • {controller}
  • {controller}/{param}
  • {controller}?{param.key1}={param.value1}&{param.key2}={param.value2}
  • {controller}/{action}
  • {controller}/{action}/{param}
  • {controller}/{action}?{param.key1}={param.value1}&{param.key2}={param.value2}
See Also