question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Expose the raw `event.request`

See original GitHub issue

https://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:closed
  • Created 2 years ago
  • Comments:14 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
lukeedcommented, Sep 15, 2021

This is achieved through #83 and will be available as worktop@next for the time being.

1reaction
d-gagnecommented, Jun 28, 2021

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found