ionited / mesh

A fast web framework based on uWebSocket.js
MIT License
27 stars 3 forks source link

uWS.HttpResponse writes must be made from within a corked callback #5

Open jaredxx1 opened 5 months ago

jaredxx1 commented 5 months ago

Hey,

I can't send body. I'm trying to run a proxy which forwards the requests to an origin server and gets the response back with fetch.

The error is: uWS.HttpResponse writes must be made from within a corked callback. See documentation for uWS.HttpResponse.cork and consult the user manual.

.cork does not exist on the response object as is in the original uWs lib.

Any thoughts?

gabrielcursino commented 5 months ago

Hello @jaredxx1!

uWS.HttpResponse writes must be made from within a corked callback. See documentation for uWS.HttpResponse.cork is just a warning, it shouldn't stop you from sending body.

Can you provide a reproducible repo?