Skip to content

Releases

Refit 1.2.0

Choose a tag to compare

@anaisbetts anaisbetts released this 20 Jun 19:32

What's New

Request Headers

Thanks to @bennor, Refit now supports adding request headers to both individual methods as well as to entire classes via the [Header] attribute. Here's an example:

[Headers("X-Emoji: :rocket:")]
public interface IGitHubApi
{
    [Get("/users/list")]
    Task<List> GetUsers();

    [Get("/users/{user}")]
    [Headers("X-Emoji: :smile_cat:")]
    Task<User> GetUser(string user);

    [Post("/users/new")]
    [Headers("X-Emoji: :metal:")]
    Task CreateUser([Body] User user, [Header("X-Emoji")] string emoji);
}

Refit 1.1.0

Choose a tag to compare

@anaisbetts anaisbetts released this 02 May 19:25

What's New

Methods can return Task

Thanks to @dahlbyk, methods can return Task for HTTP requests that don't have a response with any information (i.e. "DeleteXYZ" that only signals if it worked or not)

Bug Fixes

  • Fix a crash on certain method definitions (#21, thanks @vevix)

Refit 1.0.0

Choose a tag to compare

@anaisbetts anaisbetts released this 30 Jul 21:24

Refit 1.0.0

Initial Release

⌂ 换网址