servicestack syncreply removed, not backwards compatible?

杀马特。学长 韩版系。学妹 提交于 2019-12-12 01:14:05

问题


We're in the process of upgrading to servicestack v4 and noticed that the default "SyncReply" route was removed in favor of "Reply". We have customers who are actively using these endpoints in our services. What is the recommended way to achieve backwards compatibility for these customers, without having to manually register the routes for each content-type+service?


回答1:


You can use v3 clients that point to a v4 server by using the UseNewPredefinedRoutes property, provided that the over-the-wire interface stays the same. As you're aware v4 has changed the built in routes, and by setting the above mentioned property the v3 clients will use the new v4 routes.

var client = new JsonServiceClient("http://...");
client.UseNewPredefinedRoutes = true;


来源:https://stackoverflow.com/questions/21534493/servicestack-syncreply-removed-not-backwards-compatible

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!