Releases: reactiveui/refit
v4.3
Bugfix release with two main fixes:
- #432 Enumerable serialization in query strings failing
- #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
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
This version adds many bug fixes since the last release and has the following notable new features:
- 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 - The build task has been refactored into an MSBuild task, so it should have fewer issues with Mono on macOS
Refit 2.4.0
What's New
Release notes soon
Refit 2.3.0
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
Refit 2.2.1
What's New
Bug Fixes:
Refit 2.2.0
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
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
Refit 2.0.2
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
Refit 2.0.1
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.