1
0
Fork 0
mirror of https://github.com/rest-client/rest-client.git synced 2022-11-09 13:49:40 -05:00

Added HTTP HEAD method to the resources, untested

Conflicts:

	rest-client.gemspec
This commit is contained in:
Julien Kirch 2010-09-22 18:36:37 +02:00
parent ab1c9205af
commit edb31a626c

View file

@ -54,6 +54,14 @@ module RestClient
:headers => headers), &(block || @block))
end
def head(additional_headers={}, &block)
headers = (options[:headers] || {}).merge(additional_headers)
Request.execute(options.merge(
:method => :head,
:url => url,
:headers => headers), &(block || @block))
end
def post(payload, additional_headers={}, &block)
headers = (options[:headers] || {}).merge(additional_headers)
Request.execute(options.merge(