3 ms·
> RestSharp makes talking to RESTful apis easier. Another interesting library for doing REST APIs is Refit: https://github.com/paulcbetts/refit https://github.
by bratsche 12y ago
> RestSharp makes talking to RESTful apis easier.
Another interesting library for doing REST APIs is Refit: https://github.com/paulcbetts/refit https://github.com/paulcbetts/refit
- Hakeashar 12y agoDamn, 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.
- xpaulbettsx 12y agoRefitStubs is necessary because on certain platforms (iOS, WinRT), you cannot JIT and therefore can't use something like Castle Core to generate a class
- Hakeashar 12y agoI figured as much. Unfortunately there's no Emit for AOT where you could do something like: https://github.com/jonwagner/Insight.Database/blob/master/Insight.Database/CodeGenerator/InterfaceGenerator.cs 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...