Skip to content

Synchronous vs Asynchronous #34

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
quangv opened this issue Nov 18, 2011 · 3 comments
Closed

Synchronous vs Asynchronous #34

quangv opened this issue Nov 18, 2011 · 3 comments

Comments

@quangv
Copy link

quangv commented Nov 18, 2011

Any way to make the request synchronous as opposed to asynchronous ?

As in I want the request to fully complete, and callback executed before it runs the next command...

request.get 'http://myurl/', (req, res)->
  text = res.text
console.log text

Also off-topic, but is req suppose to return 'null' ? it is for me. (using this on Node.)

Thanks.

@tj
Copy link
Contributor

tj commented Nov 18, 2011

the callback signature is (err, res) not (req, res) :p but nope, there wont be a sync api, in fact with node you cannot have a sync api

@tj tj closed this as completed Nov 18, 2011
@quangv
Copy link
Author

quangv commented Nov 18, 2011

oh really? boo, thanks hah, I guess I'll have to figure out another way to do it then...

thanks for the correction, and all your diligence TJ ;)

@tj
Copy link
Contributor

tj commented Nov 18, 2011

np!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants