github reactiveui/refit 1.3.0
Refit 1.3.0

latest releases: 7.0.0, 7.0.0-beta.1, 6.5.1...
9 years ago

What's New

Allow paths in the HttpClient base URL so you don't have to repeat yourself (#40, thanks @Balauru!)

    public interface IDummyHttpApi
    {
        [Get("/bar/{id}")]
        Task<string> FetchSomeStuff(int id);

        [Get("/bar/{id}?baz=bamf")]
        Task<string> FetchSomeStuffWithHardcodedQueryParameter(int id);
    }

    RestService.For<IDummyHttpApi>("http://api.com/foo")

Allow more than one parameter in a given URL segment (#47, thanks @bennor!)

    public interface IDummyHttpApi
    {
        [Get("/bar/{image}/{width}x{height}")]
        Task<byte[]> GetImageData(string image, int width, int height);
    }

Allow posting URL-encoded form data in the body (#46, thanks @bennor)

    public interface IDummyHttpApi
    {
        [Post("/foo/bar/{id}")]
        IObservable<string> PostSomeUrlEncodedStuff([AliasAs("id")] int anId, [Body(BodySerializationMethod.UrlEncoded)] Dictionary<string, string> theData);
    }

Bug fixes

  • Fixes "Misused header name" bug when using dynamic headers (#44, thanks @bennor)
  • Add more information about errors if we've got them (#45, thanks @bennor!)
  • Fixes problems related to IObservable replaying results correctly

Don't miss a new refit release

NewReleases is sending notifications on new releases.