The exported request function doesn't have an auth method #541

Merged
merged 1 commit into from May 15, 2013

Projects

None yet

3 participants

@tschaub
Contributor
tschaub commented May 3, 2013

Looks like you need to create a Request instance before calling auth.

Without this change, following the readme leads to this:

     TypeError: Object function request(uri, options, callback) {
  if (typeof uri === 'undefined') throw new Error('undefined is not a valid uri or options object.')
  if ((typeof options === 'function') && !callback) callback = options
  if (options && typeof options === 'object') {
    options.uri = uri
  } else if (typeof uri === 'string') {
    options = {uri:uri}
  } else {
    options = uri
  }

  options = copy(options)

  if (callback) options.callback = callback
  var r = new Request(options)
  return r
} has no method 'auth'
@tschaub tschaub The exported request function doesn't have an auth method
Looks like you need to create a Request instance before calling auth.
a918e04
@nylen
Member
nylen commented May 15, 2013

+1

Sorry about that! (I wrote the doc in 85fd359)

@mikeal mikeal merged commit 80d4da5 into request:master May 15, 2013
@tschaub tschaub deleted the tschaub:doc-auth branch May 15, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment