Provide direct access to response body from within events
See original GitHub issueDescribe 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:
- Created 2 years ago
- Comments:5 (5 by maintainers)
Top 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 >
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 Free
Top 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

@existentialmutt I’m gonna close this, im happy to reopen if you have any additional thoughts on this.
lol that makes a lot more sense