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

Head Method #47

Closed
dscape opened this issue Mar 6, 2012 · 3 comments
Closed

Head Method #47

dscape opened this issue Mar 6, 2012 · 3 comments

Comments

@dscape
Copy link
Contributor

dscape commented Mar 6, 2012

            ^
TypeError: Object #<Object> has no method 'head'

Any reason not to support head?

@jherdman
Copy link
Contributor

jherdman commented Mar 6, 2012

If memory serves me correctly, the supported HTTP methods can be found in scope.js. You'll notice that PATCH and OPTIONS are also missing. It should be fairly trivial to throw together a patch to support additional HTTP methods.

@pgte
Copy link
Member

pgte commented Mar 7, 2012

You can use .intercept(path, method, requestBody, options) like this:

nock('http://my.domain.com)
.intercept('/path', 'HEAD', ...)
.reply(304);

I'm adding this to the README.

@pgte pgte closed this as completed Mar 7, 2012
@lock
Copy link

lock bot commented Sep 14, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue and add a reference to this one if it’s related. Thank you!

@lock lock bot locked as resolved and limited conversation to collaborators Sep 14, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants