Sebastian Nemeth - 103 - May 6, 2014

Interested in using ServiceStack.Client to consume other, non-SS based REST APIs, but concerned over whether it’s intended to do so. Posted a question on SO about it, would love to hear from anyone who has had success trying this:

Sebastian Nemeth:

Been playing with ServiceStack.Client and I’m noticing it decorates requests with some ServiceStack formatting conventions, such as ‘json/reply/String HTTP/1.1’… Is there a way to escape this and use the JsonServiceClient to connect to arbitrary REST APIs?

Just left a comment, I don’t recommend using the Service Clients for consuming 3rd Party APIs as their optimized for consuming 3rd Party services.

For 3rd Party APIs I recommend using the approach that’s taken with the StripeGateway, i.e. using routes attributed on typed DTO’s and a generic ServiceClient: