Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

basic auth and request #472

Closed
angelochen960 opened this Issue · 1 comment

2 participants

angelochen960 Mikeal Rogers
angelochen960

hi,

I use following code to post, if the host turn off the basic auth, it works, if it turn on basic auth, the request got verified, but json is empty in the host, why?

request(
{ method: 'POST', uri: ' http://localhost:3010/job/',
'auth': {
'user': 'test',
'pass': 'test',
'sendImmediately': false
},
json: job
}
, function (error, response, body) {
if (response.statusCode == 201) {
console.log('document saved as: http://mikeal.iriscouch.com/testjs/')
} else {
console.log('error: ' + response.statusCode)
console.log(body)
}
}
)

Mikeal Rogers
Owner

Is this still an issue?

This is so old I'm closing, if it is actually still an issue just let me know and I'll re-open.

Mikeal Rogers mikeal closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.