Generates a REST Proxy URI for use in accessing REST resources while bypassing Cross Domain restrictions

Namespace:  RedCritterV1
Assembly:  RedCritterV1 (in RedCritterV1.dll) Version: 1.0.0.0 (1.0.0.0)

Syntax

      
 C#  Visual Basic 
public Uri GetRestProxyURI(
	string destinationURL,
	ConfigurationDialog..::.HttpMethod httpMethod,
	string username,
	string password,
	SettingCollection headers,
	SettingCollection postData
)
Public Function GetRestProxyURI ( _
	destinationURL As String, _
	httpMethod As ConfigurationDialog..::.HttpMethod, _
	username As String, _
	password As String, _
	headers As SettingCollection, _
	postData As SettingCollection _
) As Uri

Parameters

destinationURL
String
The REST resource URL
httpMethod
ConfigurationDialog..::.HttpMethod
GET or POST
username
String
The username, if needed, for accessing the REST resource
password
String
The password, if needed, for accessing the REST resource
headers
SettingCollection
The request headers, send null if not required
postData
SettingCollection
The request data to post to the REST resource

Return Value

Response Data

Examples

CopyC#
SettingCollection headers = new SettingCollection();
SettingCollection postData = new SettingCollection();
postData.Add(new Setting("status","Hello World"));
Uri restProxyURI = GetRestProxyURI("http://twitter.com/statuses/update.xml", HttpMethod.POST, "yourtwitterusername", "yourtwitterpwd", headers, postData);

See Also