Skip to content

Releases: reactiveui/refit

v4.3

17 Feb 18:58
Compare
Choose a tag to compare

Bugfix release with two main fixes:

  1. #432 Enumerable serialization in query strings failing
  2. #404 Default buffered to true with a global option to override in settings. This fixes several WebAPI related issues.

https://github.com/paulcbetts/refit/milestone/7?closed=1

v4.2

31 Jan 02:12
Compare
Choose a tag to compare

New feature release of Refit with the following notable enhancements:

  • Generic Methods
  • Overloaded Methods
  • Serializing any POCO as a multipart json content
  • Support for getting response headers (ApiResponse<T>)

These were possible because of contributions from the community, thank you!

Doc updates forthcoming.

Full list of fixes: https://github.com/paulcbetts/refit/milestone/6?closed=1

v4.0

15 Aug 12:16
Compare
Choose a tag to compare

This version adds many bug fixes since the last release and has the following notable new features:

  1. Support for building with dotnet build. This support requires the .NET Core 2 SDK and will not work with the 1.x SDK. Projects can still target any supported target framework
  2. The build task has been refactored into an MSBuild task, so it should have fewer issues with Mono on macOS

Refit 2.4.0

24 Sep 04:40
Compare
Choose a tag to compare

What's New

Release notes soon

Refit 2.3.0

01 Jun 04:58
Compare
Choose a tag to compare

What's New

Multipart uploads (#146, thanks @mteper)

Methods decorated with Multipart attribute will be submitted with multipart content type.
At this time, multipart methods support the following parameter types:

  • string (parameter name will be used as name and string value as value)
  • byte array
  • Stream
  • FileInfo

For byte array and Stream parameters, use AttachmentName parameter attribute to specify the
name for the attachment. For FileInfo parameters, the file name will be used.

public interface ISomeApi
{
    [Multipart]
    [Post("/users/{id}/photo")]
    Task UploadPhoto(int id, [AttachmentName("photo.jpg")] Stream stream);
}

New Features

  • HttpContent can now be returned or used as a parameter, and it will be used as the body (#104, thanks @onovotny)

Bug Fixes

  • Fix bugs around content headers (#139, thanks @bennor)

Refit 2.2.1

08 Feb 23:27
Compare
Choose a tag to compare

What's New

Bug Fixes:

  • Add support for the PATCH HTTP method (#115, #119, thanks @cristi-badila)
  • Fix issue where WP8 and PCL in the same project would cause issues (#117, thanks @moswald)
  • Add APIException to the PCL library (#128, thanks @bennor)

Refit 2.2.0

03 Jan 23:41
Compare
Choose a tag to compare

What's New

Refit Serializer Settings

Refit now allows you to control JSON serialization, via passing in a new RefitSettings type into RestService.For<T>:

var gitHubApi = RestService.For<IGitHubApi>("https://api.github.com",
    new RefitSettings {
        JsonSerializerSettings = new JsonSerializerSettings {
            ContractResolver = new SnakeCasePropertyNamesContractResolver()
        }
    });

Diagnostic information (#79, thanks @nekresh)

Refit now prints diagnostic information inside VS when an interface can't be generated

Bug Fixes

Refit 2.1.0

14 Nov 05:03
Compare
Choose a tag to compare

What's New

Generic Interface Support (#70)

Thanks to @bennor, you can now define generic interfaces that apply to multiple APIs:

public interface IReallyExcitingCrudApi<T, in TKey> where T : class
{
    [Post("")]
    Task<T> Create([Body] T paylod);

    [Get("")]
    Task<List<T>> ReadAll();

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

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

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

// Later, in another part of town...
var userApi = RestService.For<IReallyExcitingCrudApi<User, string>>("http://api.example.com/users"); 
var adminApi = RestService.For<IReallyExcitingCrudApi<Admin, string>>("http://api.example.com/admins"); 

URL Parameter Formatting (#66)

Thanks to @carl-berg, types that are serialized in the URL query string can now define custom formatting, via a new RefitSettings class that is optionally passed to RestService.For.

Bug Fixes / Improvements

  • URL parameters are now no longer case-sensitive (#68, thanks @flagbug)
  • Refit Interfaces which were defined in different assemblies than where they were used will now correctly get stubs generated (#67, thanks @bennor)
  • Type aliases will now be recognized in interfaces (#62, thanks @bennor)

Refit 2.0.2

13 Oct 17:48
Compare
Choose a tag to compare

What's New

Support for Windows Store / Windows Phone 8.1 Universal Apps (#59, thanks @bennor)

Because of the compile-time code generation mentioned above, Refit 2.0 now has full support for WinRT (Windows Store) and Windows Phone 8.1 Universal applications too!

Bug Fixes

  • Handle spaces in project paths (#60, thanks @bennor)
  • Fix some oopses in code generation (#58, thanks @flagbug)

Refit 2.0.1

13 Oct 00:42
Compare
Choose a tag to compare

What's New

2.0.1 is an Oops release to fix a PLib packaging issue as well as bump the NuGet package versions. This release also saves some space by removing unnecessary PDBs.