Hint that using `data` is wrong
See original GitHub issueFrom time to time i see ppl using data
instead of body
which is wrong.
happened just recently in https://github.com/node-fetch/node-fetch/issues/481#issuecomment-717864624
how do you feel about adding a little warning message that can only appear once. (kinda like node reports that you are using experimental apis)
if ('data' in bodyInit && notWarned) {
console.warn('use body instead')
}
class Response {
get data () {
notWarned && console.warn('you want to use .json(), .text(), .arrayBuffer() or just .body')
}
}
I don’t think it is uncommon to see those mistake happening when switching from different request libraries axios
use data instead of body for example. I can admit that i have used data as well and wasted minutes trying to figure out what’s wrong
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Excel Tips: A Trick for Finding Inconsistent Data - GCF Global
Finding inconsistent data in a large spreadsheet can be time consuming. This Excel trick can make it much easier.
Read more >The Problem With Data Is Too Much Of The Wrong Stuff.
Siloed business systems and incompatible data are the major culprits. That leaves companies faced with more than just lost productivity, ...
Read more >Formatting problems – Data Organization in Spreadsheets for ...
What are some common challenges with formatting data in spreadsheets and how can we avoid them? Objectives. Recognize and resolve common spreadsheet ...
Read more >How to know the hint/ solution in exercise sheet - Kaggle
it wont work for me when i uncomment it and it says q1.hint() i click run and it comes back with an error...
Read more >How to Make Custom Excel Data Validation Message Help ...
The default error alert settings block people from entering invalid data in the data validation cell. With those default settings, if you try...
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
Yay, i claimed issue 1000 🎉
it’s not like we are adding any new feature/method into fetch, it’s just a way of helping/notifying that what you might be doing is wrong. such notification could easily be removed if we ever decide to ditch it again