Tiny.RestClient is a great library. Some of us believe it could upgraded to surpass all Http Client programs
Reference to old Issue on AddUriParameter, here is an Example
public void GET_with_resource_containing_tokens()
{
RestRequest request = new RestRequest("resource/{foo}");
request.AddUrlSegment("foo", "bar");
RestClient client = new RestClient(new Uri("http://example.com"));
Uri expected = new Uri("http://example.com/resource/bar");
Uri output = client.BuildUri(request);
Assert.AreEqual(expected, output);
}
public void POST_with_resource_containing_tokens()
{
RestRequest request = new RestRequest("resource/{foo}", Method.POST);
request.AddUrlSegment("foo", "bar");
RestClient client = new RestClient(new Uri("http://example.com"));
Uri expected = new Uri("http://example.com/resource/bar");
Uri output = client.BuildUri(request);
Assert.AreEqual(expected, output);
}
Tiny.RestClient is a great library. Some of us believe it could upgraded to surpass all Http Client programs
Reference to old Issue on AddUriParameter, here is an Example
public void GET_with_resource_containing_tokens() { RestRequest request = new RestRequest("resource/{foo}"); request.AddUrlSegment("foo", "bar"); RestClient client = new RestClient(new Uri("http://example.com")); Uri expected = new Uri("http://example.com/resource/bar"); Uri output = client.BuildUri(request); Assert.AreEqual(expected, output); }
public void POST_with_resource_containing_tokens() { RestRequest request = new RestRequest("resource/{foo}", Method.POST); request.AddUrlSegment("foo", "bar"); RestClient client = new RestClient(new Uri("http://example.com")); Uri expected = new Uri("http://example.com/resource/bar"); Uri output = client.BuildUri(request); Assert.AreEqual(expected, output); }