Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AddUriParameter Support in Tiny.RestClient- Example Code Snippnet #92

Open
aboah opened this issue May 21, 2019 · 2 comments
Open

AddUriParameter Support in Tiny.RestClient- Example Code Snippnet #92

aboah opened this issue May 21, 2019 · 2 comments

Comments

@aboah
Copy link

aboah commented May 21, 2019

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);
        }

@jgiacomini
Copy link
Owner

Hello,

Thanks for the sample I understand better what you want.
I will try to interate it on the next release

@jgiacomini
Copy link
Owner

If someone can help to implement this feature :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants