Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

having trouble with multi server requests #2

Open
boxxxie opened this issue Dec 9, 2012 · 0 comments
Open

having trouble with multi server requests #2

boxxxie opened this issue Dec 9, 2012 · 0 comments

Comments

@boxxxie
Copy link

boxxxie commented Dec 9, 2012

i want to have a request to my server execute a request to another server with your libraries.

$("session").method("GET").contentType("text/html").contentApp(function(request) {
        var http = require('q-io/http');
        return http.request("localhost:5984")
    })

in this i'm piping to couchdb, i'm ok with http.request only giving me back a stream. i want that stream to go to the app that is making the request.
the above code is throwing errors...

/home/paul/eg/api/node_modules/q/q.js:1319
                throw error;
                      ^
Error: connect EINVAL
    at errnoException (net.js:769:11)
    at connect (net.js:645:19)
    at Socket.connect (net.js:710:9)
    at asyncCallback (dns.js:67:16)
    at Object.onanswer [as oncomplete] (dns.js:120:9)
From previous event:
    at chain.contentApp (/home/paul/eg/api/node_modules/joey/joey.js:235:22)
    at Object.exports.Method [as app] (/home/paul/eg/api/node_modules/q-io/http-apps.js:626:47)
    at exports.Route (/home/paul/eg/api/node_modules/joey/lib/route.js:115:31)
    at exports.Route (/home/paul/eg/api/node_modules/joey/lib/route.js:117:24)
    at exports.Log (/home/paul/eg/api/node_modules/q-io/http-apps.js:747:23)
    at /home/paul/eg/api/node_modules/q-io/http.js:41:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants