Eric Hauser
Eric Hauser

Reputation: 5581

OpenRasta Default Codec

I want to set a default codec in OpenRasta for all requests. i.e. When no other codec has been found using other methods, I want to use a custom JSON codec as the default. How do you wire this up in the pipeline?

Upvotes: 1

Views: 302

Answers (1)

SerialSeb
SerialSeb

Reputation: 6766

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

That should do it.

Upvotes: 2

Related Questions