Expose the raw `event.request`
See original GitHub issuehttps://github.com/lukeed/worktop/blob/master/src/request.ts#L4
$.request = request;
I intend on using this to do a passthrough handler:
export const logOnly: Handler = (request, _) => {
log(await request.body.json())
return await fetch(request.request);
};
As an aside, it also seems like you can’t proxy websocket requests with worktop
but you can with default workers. Exposing event.request
would solve this as well.
https://community.cloudflare.com/t/websocket-pass-through-crashes-worker-script/78482/6
Issue Analytics
- State:
- Created 2 years ago
- Comments:14 (8 by maintainers)
Top Results From Across the Web
Raw Events - Statsig Docs
Statsig records two types of raw events from your application: Exposure events track which users are assigned to control and test groups.
Read more >Get raw event details | CyberArk Docs
Get raw event details Copy bookmark. This method enables the user to retrieve raw events file data from EPM according to a predefined...
Read more >Raw Request - Okta Documentation
This method performs a raw HTTP request, allowing you as a flow builder to control all aspects of the HTTP request. This allows...
Read more >Splunk HTTP Event Collectors Explained | by Vinicius Egerland
What often gets in the way of the developers and engineers is HOW to use the two collectors available: JSON and RAW. This...
Read more >Ingested raw event types - IBM
Business Automation Insights can ingest specific types of raw events. ... Service integration monitoring events · Exposed automation service events.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is achieved through #83 and will be available as
worktop@next
for the time being.I like the idea of passing the original request as request.raw so that you always have access to it.
For my use case I want to access the original request body reader, but that’s currently not possible with Worktop without cloning the request.
This way you can take advantage of the worktop features but still fall back to original request handling where you need to.
The alternative is to build out 100% of functionality, which is maybe a good eventual goal, but until then request.raw may be a necessity.