Writing my own synchronous function in Node
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 20/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- javascript, node.js
Research direction
Start with the Node fs.js source linked in the issue and compare its synchronous routines with the desired HTTP call. The issue asks for basic-JavaScript pseudocode without promises or async/await; done would be a clear explanation of whether this synchronous behavior is possible. No repository file or test is identified.
Written by the indexing model from the issue text.
Description
TL;DR: If they can do it in the fs routines, it must be possible for me to do it in my own code, right??
In Frontier, you make a simple HTTP request this way:
htmltext = tcp.httpReadUrl ("http://scripting.com"/)
I want to do the same thing in Node.
No callback. Just return the contents of the page. If I want to catch the error I can put it inside try/catch.
I have tried reading the source for the fs sync routines. Eventually it will click and I'll see how to do this. If they can do it, presumably so can I. But I thought I'd ask if people can show me how to do this sooner.
The answer should be in pseudocode. No need to go into the details of making an actual HTTP request. And just use basic JavaScript, I don't want promises or async/await. I want it to be as simple as shown above. Thanks!
PS: The reason is I want to have Frontier-like scripting for Node-implemented websites. I want to use JavaScript syntax, not bash or Python. I like JS. ;-)
- Dominant language
- HTML
- Stars
- 134
- Forks
- 10
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from scripting/Scripting-News
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
scripting/Scripting-News#353 · 6 comments ·
-
Difficulty 1/5 Under an hour Newbie friendliness 75/100
scripting/Scripting-News#332 · 25 comments · 1 reaction ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
scripting/Scripting-News#362 ·
-
Matt is moved aside Open
Difficulty 5/5 Over a week Newbie friendliness 20/100
scripting/Scripting-News#361 ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
scripting/Scripting-News#360 · 1 comment · 1 reaction ·
All issues in scripting/Scripting-News
Similar issues
-
bug priority:normal ready-for-dev
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
OpenHands/extensions#626 · 1 comment ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
avniproject/avni-client#2135 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
use-agent-os/agent-os#3276 ·