I am importing as import { CompressionPlugin, RPCHandler } from "@orpc/server/fetch";
Anytime i use the plugin i get the error "Cannot parse response body, please check the response body and content-type."
And if i remove it everything works fine
const handler = new RPCHandler(router, {
plugins: [
new CORSPlugin({
origin: (origin, _options) => origin,
allowMethods: ["*"],
}),
new RethrowHandlerPlugin({
// Decide which errors should be rethrown.
filter: (error) => {
return !(error instanceof ORPCError);
},
}),
new BatchHandlerPlugin(),
new CompressionPlugin(), // <---- ii have to remove this for it to work
new RequestHeadersPlugin(),
new ResponseHeadersPlugin(),
],
});
Also am using cloudflare don't know if that has anything to do with it but just say i should mention.
I am importing as import { CompressionPlugin, RPCHandler } from "@orpc/server/fetch";
Anytime i use the plugin i get the error "Cannot parse response body, please check the response body and content-type."
And if i remove it everything works fine
Also am using cloudflare don't know if that has anything to do with it but just say i should mention.