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,
	App..::.HttpMethod httpMethod,
	string username,
	string password,
	App..::.SettingCollection headers,
	App..::.SettingCollection postData
)
Public Function GetRestProxyURI ( _
	destinationURL As String, _
	httpMethod As App..::.HttpMethod, _
	username As String, _
	password As String, _
	headers As App..::.SettingCollection, _
	postData As App..::.SettingCollection _
) As Uri

Parameters

destinationURL
String
The REST resource URL
httpMethod
App..::.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
App..::.SettingCollection
The request headers, send null if not required
postData
App..::.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