Describe the bug
The RawRouter defaults to the Json codec which means you get JSON-stringified base64 bytes if you try to return what most would consider a "raw" HTTP body to be.
To Reproduce
Create a raw HTTP router component and return JSON bytes as the response (w/ JSON content-type header)
Expected behavior
The HTTP response looks and feels like normal JSON
Actual behavior
You get a base64-ed string that – when decoded – is the JSON you'd expect.
Proposal
Change the default codec for the Raw router to be Raw instead of Json.
Describe the bug
The
RawRouterdefaults to theJsoncodec which means you get JSON-stringified base64 bytes if you try to return what most would consider a "raw" HTTP body to be.To Reproduce
Create a raw HTTP router component and return JSON bytes as the response (w/ JSON content-type header)
Expected behavior
The HTTP response looks and feels like normal JSON
Actual behavior
You get a base64-ed string that – when decoded – is the JSON you'd expect.
Proposal
Change the default codec for the Raw router to be
Rawinstead ofJson.