Hacker News new | ask | show | jobs
by Hakeashar 4083 days ago
Damn, thanks for pointing me in that direction. It's exactly what I've been looking for.

Technically, I implemented some of that stuff myself because I needed REST client that would work with PCLs and be a bit 'nicer' to use than just juggling strings/routes everywhere, so using annotations and wrapping Microsoft's HttpClient was obvious and relatively easy way out.

Anyway, I'll probably just phase out my own solution and start using the library.

[EDIT]

After checking it out, RefitStubs.cs file seems a little bit clunky, but the library as a whole looks solid enough. I'll look further into it.

1 comments

RefitStubs is necessary because on certain platforms (iOS, WinRT), you cannot JIT and therefore can't use something like Castle Core to generate a class
I figured as much. Unfortunately there's no Emit for AOT where you could do something like: https://github.com/jonwagner/Insight.Database/blob/master/In...

On the other hand, I wonder if it wouldn't be easier to ship a T4 template? I know for sure that would integrate with VS (both the IDE and build process) without any issues, not sure about Xamarin Studio...