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.

Provide direct access to response body from within events

See original GitHub issue

Describe Problem

Maybe I just need to get better with fetch, but after catching an ajax:success event I fumbled with jumping through async hoops to get to the body content. Finally settled on event.detail.response.json().then(operations => CableReady.perform(operations)) which I guess isn’t that awful but took me a few tries and some digging through fetch docs to get there.

Suggest Solution

I’d love it if event.detail provided a responseBody property (or function) that provides direct access to the response body content as a string.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
KonnorRogerscommented, Jun 15, 2021

@existentialmutt I’m gonna close this, im happy to reopen if you have any additional thoughts on this.

0reactions
existentialmuttcommented, Jun 15, 2021

lol that makes a lot more sense

Read more comments on GitHub >

github_iconTop Results From Across the Web

Angular 2: How to access an HTTP response body?
I want to have access in the code to body field in the response. The 'body' field starts with an underscore, which means...
Read more >
Request and Response operations in ASP.NET Core
Learn how to read the request body and write the response body in ASP.NET Core.
Read more >
Event handling (overview) - Event reference - MDN Web Docs
Events are signals fired inside the browser window that notify of changes in the browser or operating system environment.
Read more >
Set up an integration response in API Gateway
Set up an integration response in API Gateway · Specify an HTTP status code of a method response to which the integration response...
Read more >
3 ways to use Angular HTTP Interceptors - Briebug Blog
When an application needs to restrict access to certain routes, an interceptor can provide that functionality in one place across many routes.
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