JornWildt / Ramone

A C# client framework for consuming HTTP/REST services
Other
61 stars 11 forks source link

Add support for binding with a ILink #19

Closed JornWildt closed 7 years ago

JornWildt commented 10 years ago

It seems a bit silly that I have to do this:

using (RestSession.Bind(myLink.HRef).Post<BOMCase>(args))
{
}

When "myLink" is ILink I should be able to do:

using (RestSession.Bind(myLink).Post<BOMCase>(args))
{
}
JornWildt commented 10 years ago

And if "myLink" is ISessionLink then I would like to do:

using (myLink.Post<BOMCase>(args))
{
}

But that would require a large set of extension methods to ISessionLink (all the sync/async HTTP methods).

So maybe this would be okay:

using (myLink.Bind().Post<BOMCase>(args))
{
}
JornWildt commented 7 years ago

This is a duplicate of #28.

using (myLink.Bind().Post<BOMCase>(args)) can be done as using (myLink.Follow().Post<BOMCase>(args)).