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

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

Merged
merged 1 commit into from
May 15, 2013

Conversation

tschaub
Copy link
Contributor

@tschaub 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'

Looks like you need to create a Request instance before calling auth.
@nylen
Copy link
Member

nylen commented May 15, 2013

+1

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

mikeal added a commit that referenced this pull request May 15, 2013
The exported request function doesn't have an auth method
@mikeal mikeal merged commit 80d4da5 into request:master May 15, 2013
@tschaub tschaub deleted the doc-auth branch May 15, 2013 17:15
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

Successfully merging this pull request may close these issues.

3 participants