1

我想在 OpenRasta 中为所有请求设置默认编解码器。即当没有使用其他方法找到其他编解码器时,我想使用自定义 JSON 编解码器作为默认值。您如何将其连接到管道中?

4

1 回答 1

2
ResourceSpace.Has.ResourcesOfType<object>()
                 .WithoutUri
                 .TranscodedBy<MyCustomCodec>()
                 .ForMediaType("application/json");

那应该这样做。

于 2010-08-17T07:54:48.680 回答