paulcbetts/refit — pull request #70 by bennor (2014-11-03 05:34:53+00:00)
Title: Generic interface support

When using something like Web API, it's a fairly common pattern to have a whole stack of CRUD rest services. Refit now supports these, allowing you to define a single API interface with a generic type:

```csharp
public interface IReallyExcitingCrudApi where T : class
{
[Post("")]
Task Create([Body] T paylod);

[Get("")]
Task> ReadAll();

[Get("/{key}")]
Task ReadOne(TKey key);

[Put("/{key}")]
Task Update(TKey key, [Body]T payload);

[Delete("/{key}")]
Task Delete(TKey key);
}
```

Which can then be used like this:

```csharp
// The "/users" part here is kind of important if you want it to work for more
// than one type (unless you have a different domain for each type)
var api = RestService.For>("http://api.example.com/users");
```

---
This fixes #63.

I will update the docs to something like the above if you're happy with the changes.